-
Notifications
You must be signed in to change notification settings - Fork 125
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
aria-valuetext would be useful on many more roles #711
Comments
In my opinion, aria-labelledby should only be used for labels and never be used for the value. Label and value are different things. It is important that assistive technology can distinguish between them to enable correct output (see w3c/aria-practices#1137). I.e. for textbox and searchbox only the text content can be used as value at the moment. Or the value attribut, if one use a It should also be checked whether aria-valuetext will be allowed as an attribute for textbox and searchbox in the future. The reason is that not all HTML elements can have text content, e.g. |
Please be aware that the |
Why? If the img has an alt attribute it is allowed:
|
Ah you’re right, missed that one. I’m very curious as to why that’s allowed. Not entirely sure in which scenario you’d want to make an image a textbox. @stevefaulkner do you know more about that? |
@ZoeBijl |
There should be an ARIA equivalent of HTML’s |
If the text content can be used as a value, one should also specify the rules according to which the text content is determined, analogous to AccName. For example, JAWS+Firefox currently ignore CSS-generated content within a |
@ZoeBijl currently any role is allowed, on img, but I would certainly consider restrictions based on reasoning role=textbox defintely appears nonsensical (unless its readonly perhaps). please file an issue https://github.com/w3c/html-aria/issues |
The constraints on which roles support the aria-value* attributes are far too narrow. Another use case: A "recent posts" button which shows how many unread messages are in the stack. And in our case, we want to count how many times certain things happen during an audio recording, so I need aria-valuenow on an otherwise ordinary pushbutton. I don't need a fully-fledged spinbutton in this case. |
There are some places in the APG where aria-labelledby is being used to provide values. I would like to see the ability to support aria-valuetext on more roles to provide a readable value-like attribute for the item.
An example is https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-collapsible.html Where the button has Neptunium
Another place where this would be essential in order to be able to mimic HTML functionality would be creating a labelled textbox. As the spec currently is written there is no way to provide both an accessible name and a value for something with role="textbox" for example.
The text was updated successfully, but these errors were encountered: