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

aria-valuetext would be useful on many more roles #711

Open
jnurthen opened this issue Apr 5, 2018 · 10 comments
Open

aria-valuetext would be useful on many more roles #711

jnurthen opened this issue Apr 5, 2018 · 10 comments
Assignees
Labels
feature may add new concept(s) to ARIA which will require implementations or APG changes good medium issue high author impact
Milestone

Comments

@jnurthen
Copy link
Member

jnurthen commented Apr 5, 2018

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.

@JAWS-test
Copy link
Contributor

JAWS-test commented Sep 20, 2019

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 input element. But this is not defined in the specification. Should therefore be supplemented.

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. img. So what would be the value of img role=textbox alt=...?

@ZoeBijl
Copy link

ZoeBijl commented Sep 20, 2019

Please be aware that the textbox-role is not allowed on the img-element.

@JAWS-test
Copy link
Contributor

Why? If the img has an alt attribute it is allowed:

Any role except presentation or none

@ZoeBijl
Copy link

ZoeBijl commented Sep 20, 2019

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?

@JAWS-test
Copy link
Contributor

@ZoeBijl
I don't want to turn a graphic into a text box. I wouldn't ever want to make a textbox out of any HTML element, because there is the input element and that's good enough. The problem is: Others want this and I have to deal with their results. So what I want: A clear rule in the ARIA specification where a textbox or searchbox gets its value from.

@ZoeBijl
Copy link

ZoeBijl commented Sep 20, 2019

There should be an ARIA equivalent of HTML’s value-attribute. We’ll have to see how to best work that into the spec without too many changes.

@JAWS-test
Copy link
Contributor

JAWS-test commented Sep 25, 2019

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 textbox but not within option in listbox. JAWS+Chrome does not output CSS content for textbox and option. See value of textbox and listbox

@stevefaulkner
Copy link
Contributor

@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

@brennanyoung
Copy link
Contributor

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.

@jnurthen
Copy link
Member Author

jnurthen commented Mar 2, 2021

see also #574 #1308

@jnurthen jnurthen self-assigned this Mar 2, 2021
@jnurthen jnurthen removed the F2FCandidate Candidate topics for F2F (or Virtual F2F) meeting label Mar 2, 2021
@jnurthen jnurthen added the feature may add new concept(s) to ARIA which will require implementations or APG changes label Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature may add new concept(s) to ARIA which will require implementations or APG changes good medium issue high author impact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants