Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support aria-valuenow on other roles which might represent values? #1221

Closed
brennanyoung opened this issue Mar 19, 2020 · 3 comments
Closed

Comments

@brennanyoung
Copy link
Contributor

In a concrete use case, we have a series of buttons which record how many times they have been clicked. The tally is displayed on the button beside the label. There is no way to count down or reset the tally. In a sense, the tally is read-only, in that it can only be modified via clicks, rather than by text entry.

This behavior falls somewhere between a push button and a spinbutton.

I should add that we have dozens of these buttons, so a clean and lean presentation is preferred.,

If I mark up the control as a spinbutton, I believe I am required to support all the other spin button behavior, such as reset and decrement. The spinbutton role will raise certain expectations about use which we simply wont fulfil.

If I mark up the control as a button, then the aria-valuenow (and related aria value attributes) will not be supported. (i.e. it is likely to fail). This is how I interpret the ARIA spec on attribute processing at least.

Isn't it reasonable that widgets other than

  • range
  • scrollbar
  • separator
  • slider
  • spinbutton
  • progressbar

... might have a value associated with them? How else will I communicate the tally in an accessible way? Should I piggyback on the aria-label? That seems kinda hacky, especially when there is an aria property intended for communicating this kind of thing in other roles.

Just as a button becomes a menu button or a toggle button not by changing its role, but by adding attributes, could we not conceive other common button subtypes, whose semantics is determined by existing optional attributes?

A 'recent posts' button with a notification tally is a similar and very common case, so I don't think this case is all that exotic.

If this has been discussed somewhere, please direct me to that thread, and this issue can be closed.

@brennanyoung
Copy link
Contributor Author

Ha! I notice @smhigley just asked a very similar question at #1220

@carmacleod
Copy link
Contributor

@brennanyoung Are you ok with closing this as a dup of #711?

@jnurthen
Copy link
Member

Closing - please reopen if you don't agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants