-
Notifications
You must be signed in to change notification settings - Fork 22
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
No mention of aria-placeholder in name/description calculation algorithm #17
Comments
Hey @joanmarie re: the open mozilla ticket expose placeholder object attribute for HTML placeholder, @stevefaulkner noticed we were also missing |
As per today's ARIA WG discussion, I opened an issue against HTML-AAM regarding the ordering/preference of title versus placeholder. Since we want to be in sync with them, we should probably wait until we have consensus on that issue before deciding what we want to do in AccName. w3c/html-aam#168 |
From the comments in w3c/html-aam#168 I think it is agreed that placeholder should come after title. @joanmarie should we keep this on the agenda for this week? |
If we have more to discuss, then yes. If instead the plan is to move forward and bring AccName into alignment with what's in HTML-AAM, then I don't think this needs to be on the agenda -- at least not until we have a pull request for AccName or further questions for which input is required. |
Sounds like a plan.
|
I still AM a bit confused regarding placeholder as fallback in accessible name / description computation. UIA-mapping-wise, content is transported using own designated property: https://www.w3.org/TR/core-aam-1.1/: MSAA/UIA mappings for aria-placeholder : Object Attribute: placeholder-text: / Property: AriaProperties.placeholder: and https://w3c.github.io/html-aam/ points to the https://www.w3.org/TR/core-aam-1.1/ for mapping of placeholder. With other words, Jaws, NVDA whatsoever will speak placeholder by default no matter what is in accName/accDescription. At least this default makes sense for me. Html-aam 5.1.1 maps placeholder as last resort and ARIA-WG decision in 3/7/19 meeting was to follow them here in the ARIA accessible name computation module. In consequence, if placeholder will be mapped now in accName as last resort for cases like
we will have a filled accName: <”Search”> AND a filled Object Attribute: placeholder-text:<”Search”> AND AT must DECIDE to speak ONLY ONCE of them on focus. That’s the caveat. Who is going to tell AT that? In the last WG meeting minutes, it was said: “if you have a valid name and not description that idea is placeholder goes into the description” The question is now REALLY and it must be made crystal clear if placeholder is rated as a) “valid name” If a), then placeholder string
Will NOT go into accName but into accDescription. If b) then placeholder string
will go into accName (as discussed above). But what is with accDescription in this case? Read on. Things get a bit more complicated now if we add a tooltip:
According to the logic given above, there must be now a precedence ruling applied for title vs. placeholder which is currently title > placeholder (is that so decided?) yielding accName=”Search” and accDescription=”Search for cities”. But as a potential side effect of this mapping rule for this, in
since title is NOT defined, do we have also an automatic fallback mapping of placeholder being mapped to the accDescription when title is missing in such cases? If so, this leaves us with accName=”Search” AND accDescription=”Search” AND a filled Object Attribute: placeholder-text:<”Search”> which AT needs to fiddle out what to speak now and what not because of redundancy. I think in consequence when title or aria-describedby is NOT defined for that node, placeholder should not mapped AT ALL to accDescription. This is what I meant saying we need concrete “what will happen” examples to discuss this. |
Hi, If this is the case, then placeholder content would only appear as Name if there were no prior labelling mechanisms detected, such as all those listed prior including the title attribute, otherwise placeholder would not appear in either Name or Description, and assistive technologies would then have to do whatever they wish with that information as they currently do now, because the placeholder content would not appear anywhere within either as part of AccName. Does this make sense? Is this what people think this should do? |
HI @accdc -- what are your thoughts on giving precedence to placeholder over title in the naming computation? Here is the use case with placeholder + title + value on an input control.
The result (with Chrome 72 / JAWS 2019) 'First Name Dev only first name' seems okay as placeholder is concise (and hopefully vetted to be meaningful). I think Chrome already computes placeholder (First name) as name and title (only first name) as description in the accessibility tree as shown below. However, the proposed HTML AAM gives precedence to title over placeholder in the name computation (see 3 and 4 below):
|
We did actually go over that, and the goal of the mappings is part of the role parody project, where it was brought up that these two specs need to be in alignment, so if we did make it so that placeholder whent before title, then the HTML AAM would need to change this to match this instead. I'm not strongly aligned with either, but I need there to be ARIA WG agreement which one is the best course to follow, and if the latter, then the Web Platforms WG would need to agree as well. |
to resolve this issue:
|
Link to discussion, which Scott summarized above, in today's meeting: https://www.w3.org/2022/10/27-aria-minutes#t07 |
related to w3c/accname#17 In terms of how naming is calculated, because `placeholder` is included as the last-resort option for naming, that means that `aria-placeholder` is too. So, without calling that out explicitly (because we absolutely don't want to make it seem that naming an element via `aria-placeholder` is at all a proper thing to do), instead slightly reword the step to allude to using the placeholder value instead of the attribute itself. The placeholder text now links to the attribute, which indicates it maps to the aria-placeholder property... so, a very round about way of calling this out, but roundabout on purpose. The alternative to this is we just list `placeholder` and `aria-placeholder` and indicate that's the order of preference - HTML feature over ARIA if both are present.
I thought I'd add an example of where I'm encountering this lack of clarity on placeholder as a problem in relation to Label in Name, which reads:
Most of the time, a search input has no visible text label but it DOES have placeholder text. This is such a common pattern now that even where there is TONS of space available to put in a label, as in this example from the Google home page, there is no label, yet a placeholder provides some context (in this image "Search Google or type a URL"). Often these search mechanisms display a magnifying glass as a visual cue to the 'search' nature of the input. These icons may or may not be exposed to AT (they're often hidden to reduce verbosity from input type="search" and/or role="search"). For someone trying to meet Label in Name, the placeholder text is likely to be read by a speech input user, so it makes sense to ensure all or some of it is in the accessible name. There is also the situation where the placeholder value may be a good differentiator for multiple search inputs on one page (one in header for site, one on the page for filtering, etc). I'm not defending or celebrating the convention of ditching labels on search inputs (or in logon dialogs). I'm just flagging this real-world common convention. Thanks for your efforts in this messy space! |
FYI WPT PR #42093 is about to be merged according to what's in the HTML-AAM spec. If this issue changes those expectations, please file a new issue on https://github.com/web-platform-tests/interop-2023-accessibility-testing/issues |
Moving this over from w3c/aria#337.
Should aria-placeholder be part of the accessible description calculation?
The text was updated successfully, but these errors were encountered: