-
Notifications
You must be signed in to change notification settings - Fork 66
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
[NEW RULE] - ARIA required accessible names - aria-required-accessible-name-gp8n89 #2190
base: develop
Are you sure you want to change the base?
Conversation
description: | | ||
This rule checks that WAI-ARIA accessible name is available when required. | ||
accessibility_requirements: | ||
aria12:accessible_name_required: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIrc, the second part is supposed to be the id
of an element in the document so we can link to it (https://github.com/act-rules/act-tools/blob/cc2208ac0df7d53748d977cc7813887cbbf6a0fc/src/act/get-accessibility-requirement.ts and https://github.com/act-rules/act-tools/blob/cc2208ac0df7d53748d977cc7813887cbbf6a0fc/src/rule-transform/rule-content/get-requirements-map.ts), which this is not.
OTOH it doesn't look like there actually is a single place where this is defined 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jym77, exactly. Each role has its own unique requirements, which is why I've given it a general label... I'm uncertain about the best approach to address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 It seems the WAI website currently doesn't show anything for non-WCAG requirements 🙈 (example), where the old site did (example)…
Not sure why it went away, nor what we want to do. @carlosapaduarte do you have an input on that?
Co-authored-by: Jean-Yves Moyen <jym@siteimprove.com>
|
||
## Applicability | ||
|
||
This rule applies to any [HTML or SVG element][] that is [included in the accessibility tree][] and has a [WAI-ARIA 1.2][wai-aria 1.2] [semantic role][] that requires an [accessible name][] either from the [author](https://www.w3.org/TR/wai-aria-1.2/#namefromauthor) or the [content](https://www.w3.org/TR/wai-aria-1.2/#namefromcontent), unless the element has a presentational [explicit semantic role][] leading to a conflict resolved by [Presentational Roles Conflict Resolution][]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the "presentational explicit role" exception is even needed 🤔
Because <img src="foo.jpg" role="none" tabindex="0" />
is pretty much bad anyway, no matter that the conflict was trigger to give the final role.
OTOH, might be worth waiting to see what others think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Jym77,
I think I'm on the same page as you. Initially, the applicability was different, with only explicit roles, and there seemed to be some rationale behind that decision.
However, upon reviewing this matter now, I agree with what you said and I've also come to realize that our definition of semantic roles might not encompass all scenarios. Take, for instance:
<table role="none">
<tbody>
<tr>
<th>Some content</th>
<td>Some content</td>
</tr>
</tbody>
</table>
The th
element inherits a presentational role, but as it stands, our current language implies (or at least seems to imply to me) that it holds a semantic role of rowheader
, which isn't accurate (and shouldn't mandate an accessible name for this rule).
Lastly, I'm in the process of drafting three new atomic rules for the "Presentational Roles Conflict". They should be finalized soon; I'm just awaiting a response from the ARIA group regarding the last bullet point concerning the conflict of presentational roles, before presenting the PR to our group.
New rule:
The aim of this new rule is to guarantee that ARIA roles requiring an accessible name meet the specified requirements.
Closes issue(s): #2119
Need for Call for Review:
This will require a 2 weeks Call for Review
Pull Request Etiquette
When creating PR:
develop
branch (left side).After creating PR:
Rule
,Definition
orChore
.When merging a PR:
How to Review And Approve