act-rules.github.io icon indicating copy to clipboard operation
act-rules.github.io copied to clipboard

Merge "Element with aria-hidden has no focusable content" (6cfa84) and "Element with presentational children has no focusable content" (307n5z)

Open Jym77 opened this issue 5 years ago • 4 comments

Element with aria-hidden has no focusable content and Element with presentational children has no focusable content are checking very similar things: that an element should not be both excluded from the accessibility tree and focusable.

They differ in which part of "excluded from the accessibility tree" they check. We should merge them into a more generic "element not in the accessibility tree is not focusable" (or maybe avoid the double negation with "focusable element is included in the accessibility tree".

Unified rule would be more generic (if we found a new way to exclude an element from the accessibility tree, we're already covered), more future-proof (if UA/AT decide to ignore aria-hidden on focusable element, we're covered), and more technology-agnostic (the accessibility tree is an input aspect, not matter how it was built, so the rules don't need to make any supposition on how it was built) (that should also be safer with respect to Accessibility Support).

Postponing that for now since we don't have the resources to work on it. We'll likely need to deprecate the old rules when creating the new one.

Jym77 avatar Nov 23 '20 14:11 Jym77

Sounds good to me.

ajanec01 avatar Sep 03 '21 14:09 ajanec01

I think this issue can be closed. I would not personally be in favour of merging these two rules, they seem distinct enough to me.

WilcoFiers avatar Jun 15 '23 13:06 WilcoFiers

They are both instances of "Presentational conflict is not triggered". With the presentational conflict moving toward being an author error (in the ARIA 1.3 draft, Presentational Roles Conflict Resolution is currently part of Handling Author Errors), I feel it makes even more sense to group them.

(vendor hat on) I also see a lot of confusion from our customers on these rules, essentially because whenever the rules fail, the presentational conflict does trigger and the page "works" (i.e. the focusable content is exposed to AT). I feel that getting a generic wording ("presentational conflict") of "you did it wrong, the UA is fixing it for you but you still shouldn't do it" would make for an easier explanation 🤔

Jym77 avatar Jun 15 '23 14:06 Jym77

Also with my vendor hat on: it's contributing to the confusion when we use the words "hidden" and "presentational" interchangeably. They mean different things, right? For example:

	<h2 aria-hidden="true">this is hidden.
		<span>... so none of this text...
			<span>will appear in the a11y tree.
			</span>
		</span>
	</h2>
	
	<h2 role="presentation">this is presentational. 
		<span>... so all of this text...
			<span>will appear in the a11y tree...
				<span>even though the "heading" semantics won't.
				</span>
			</span>
		</span>
	</h2>

Correct me if I'm wrong.

dan-tripp-siteimprove avatar Jul 24 '23 21:07 dan-tripp-siteimprove