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

Changes Needed: ARIA14 Using aria-label to provide an invisible label where a visible label cannot be used #1986

Open
spanchang opened this issue Aug 6, 2021 · 6 comments

Comments

@spanchang
Copy link

Two changes listed: one for Description and one for Test procedure.
Description states:
"In other situations, elements can be given the attribute aria-label to provide an accessible name when the native HTML labeling element is not supported".
Suggested addition:
In such a situation ensure the value of aria-label begins with or only includes the text that functions as the visible label for the control.

Suggested Tests Procedure:
Situation A. Where text that functions as the element's visible label is present

  1. The underlying technology does not offer method to natively assign aaccessible name for the element
  2. The value of aria-label begins with or only includes the text that functions as the visible label for the element
    Expected Results
    Both 1 and 2 are true
    Situation B:
    The purpose of the element is indicated solely by its context and visual appearance without a text identifier
  3. The value of aria-label attribute properly describes the purpose of the element in the context in which it is presented
    Expected Results
    Item 1 is true

Thanks,
Sailesh

@spanchang
Copy link
Author

The test procedure should begin with:
"For each object where a aria-label attribute is present".
I accidently omitted it from suggested procedure.
Thanks

@patrickhlauke
Copy link
Member

  1. The underlying technology does not offer method to natively assign aaccessible name for the object

I would say (as discussed on mailing list previously) that this point is irrelevant. Are you suggesting that auditors should fail content if this is not the case? If so I'd strongly disagree on having this point included.

@alastc
Copy link
Contributor

alastc commented Aug 9, 2021

Suggested addition:
In such a situation ensure the value of aria-label begins with or only includes the text that functions as the visible label for the control.

I don't think we can assume there is a visible (text) label. E.g. a content editable area might be marked with an icon of a pencil. Other scenarios are buttons which may just use an icon.

To account for that, we could use:
"In this situation, and where there is visible text labelling the control, ensure the value of aria-label begins with or includes that text to also meet 2.5.3 Label in Name."

The underlying technology does not offer method to natively assign aaccessible name for the element

The top of the technique doc includes the applicability, which states "Technologies that support Accessible Rich Internet Applications (WAI-ARIA)."

I don't think we should start adding that to procedures, it would be inconsistent and repetitive.

@spanchang
Copy link
Author

No, I am not suggesting that "auditors should fail content if this is not the case".
What it means is that the technique is not warranted in the situation.
That is not what test procedure for a technique is meant for. Not passing the test procedure means the technique is not implemented correctly.
Please see existing description for ARIA14.
Alastair: Referencing an SC in a test procedure may not be a good idea.
The amendment to the test procedure has two situations including the one you describe.
Sure ARIA techniques are for technologies that support ARIA. But the description for ARIA14 does include the first rule for ARIA use
https://www.w3.org/TR/using-aria/
So the amendment to the test procedure brings it in line with what the description suggests.
It is important to nudge authors into using ARIA only when warranted. As experience shows, accessibility barriers get introduced quite often due to ARIA-misuse including using ARIA when not required.

Thanks,
Sailesh

@patrickhlauke
Copy link
Member

i'll save myself repetition and point to this #1987 (comment)

saying that barriers get introduced through misuse is one thing. the solution is not to patronisingly try to limit when a technique is valid/applicable. by all means, add a note that suggests something along the lines of "however, if there's a native way, consider using that instead", but not seemingly limiting the applicability of this technique artificially to social-engineer change here.

@spanchang
Copy link
Author

Refer: H65: Using the title attribute to identify form controls when the label element cannot be used
The title of the technique itself plus the description clearly suggest when it should be used.
This is no different from:
Technique ARIA14:Using aria-label to provide an invisible label where a visible label cannot be used.
The description for ARIA14 already states, "native HTML labeling element is not supported".
So is that "social-engineer them away from finding a solution" ?
The test procedure I proposed replaces HTML with a broader "underlying technology".
This technique then and a failure technique F96 will provide adequate guidance for properly making the name programmatically determinable.
Thanks,
Sailesh

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

No branches or pull requests

3 participants