RE: AccName Prototype Updates

Bryan,

Thank you for the update, a few clarifications:
1. Is it only the parent node of a referenced element being hidden that will result in no name or description or any ancestor of the referenced node being hidden?
2. If the parent node (or possibly any ancestor) is hidden of a referenced element, this will always result in no name  or description generated?

Jon

 


-----Original Message-----
From: Bryan Garaventa [mailto:bryan.garaventa@levelaccess.com] 
Sent: Friday, May 11, 2018 7:11 PM
To: ARIA Working Group <public-aria@w3.org>
Subject: AccName Prototype Updates

Hi,
Per the last Caucus discussion, I've updated the AccName Prototype code at https://github.com/WhatSock/w3c-alternative-text-computation

I didn't have time today  to get to the spec text changes, but coding this helps frame in my mind what is missing in the algorithm, so I'll likely be able to do this next Monday before I head out.

E.G Here are the coding changes in the prototype regarding the logic processing.

		if (ownedBy.ref) {
			if (isParentHidden(refNode, document.body, true, true)) {
				// If referenced via aria-labelledby or aria-describedby, do not return a name or description if a parent node is hidden.
				return fullResult;
			}
			else if (isHidden(refNode, document.body)) {
				// Otherwise, if aria-labelledby or aria-describedby reference a node that is explicitly hidden, then process all children regardless of their individual hidden states.
				var ignoreHidden = true;
			}
		}

As before, if the node referenced by aria-labelledby or aria-describedby is not explicitly hidden, then all children that are explicitly hidden will not be included in the computation. The above override only occurs when specifically referencing hidden nodes.

You can run this code on the prototype to validate this behavior, and please let me know if I've missed anything that we spoke of or if anything is working unexpectedly.

Thanks,
Bryan



Bryan Garaventa
Accessibility Fellow
Level Access, Inc.
Bryan.Garaventa@LevelAccess.com
415.624.2709 (o)
www.LevelAccess.com

Received on Monday, 14 May 2018 14:47:57 UTC