- From: Matt King <a11ythinker@gmail.com>
- Date: Fri, 12 Feb 2021 09:17:28 -0800
- To: "'Bristow, Alan'" <Alan.Bristow@elections.ca>, "'Steve Green'" <steve.green@testpartners.co.uk>, <w3c-wai-ig@w3.org>
Alan, I agree 100% with Steve, but there is one point I think deserves a bit of clarification: >In the case of role="menuitem", at least 90% of the time the issue is that the attribute should be removed from the link because it is in a navigation menu, not an application menu. >In the rare case that it really is an application menu, the error relates to the parent element as you described. In that statement, the word "menu" is being used in the colloquial sense, not with the meaning assigned to it in ARIA. The statement could be re-written as: >In the case of role="menuitem", at least 90% of the time the issue is that the attribute should be removed from the link because it is not in the context of a UI component that is intended to behave like an ARIA menu. The ARIA menubar and menu button patterns require specific behaviors. For example, the menubar pattern is required to behave like native Windows or Mac application menubars. Thus the term "application menu" in Steve's statement. For example, the menubar is a single tab stop and it supports arrow key and first-letter navigation within it. You are not allowed to use the ARIA menu role or menuitem role unless your UI component conforms to all the requirements of one of the menu patterns. As Steve says, 90% of the time, people make a set of navigation links that look kind of like a menubar but they don't intend to, and don't need to, provide all the functionality of a menubar. So, they should not be using the menuitem role. Instead, they should be doing something more like the ARIA disclosure pattern, like this example: https://w3c.github.io/aria-practices/examples/disclosure/disclosure-navigati on.html On the other hand, if they have good reason to use menuitem, they would need to conform to the much more complex requirements implemented in this menubar example: https://w3c.github.io/aria-practices/examples/menubar/menubar-navigation.htm l As noted on the example page, that pattern should typically not be used for navigation links. More typical use of menubar is illustrated in this example: https://w3c.github.io/aria-practices/examples/menubar/menubar-editor.html Hth, Matt King -----Original Message----- From: Bristow, Alan <Alan.Bristow@elections.ca> Sent: Wednesday, February 10, 2021 8:57 AM To: Steve Green <steve.green@testpartners.co.uk>; w3c-wai-ig@w3.org Subject: Re: Invalid ARIA necessarily a WCAG fail? (Role menuitem missing required parent role (group,menu,menubar) Thank you Steve for this most helpful advice. I entirely understand and agree with the need to use the tool as a clue, not an answer. Thank you again for the advice and prompt reply. Regards, Alan ________________________________________ From: Steve Green <steve.green@testpartners.co.uk> Sent: Wednesday, February 10, 2021 9:46 AM To: Bristow, Alan; w3c-wai-ig@w3.org Subject: RE: Invalid ARIA necessarily a WCAG fail? (Role menuitem missing required parent role (group,menu,menubar) Yes, there will be a failure of SC 4.1.2 (name, role and value). Which element the failure relates to will depend on what the intended functionality is. In the case of role="menuitem", at least 90% of the time the issue is that the attribute should be removed from the link because it is in a navigation menu, not an application menu. In the rare case that it really is an application menu, the error relates to the parent element as you described. The bottom line is that you can't just copy and paste the error description from a tool into your report. You must inspect the code and find out what's really wrong. This principle applies to every tool for every WCAG success criterion because tools frequently misdiagnose issues even when they are correct to report that there is an issue (i.e. it's not a false positive). Steve Green Managing Director Test Partners Ltd -----Original Message----- From: Bristow, Alan <Alan.Bristow@elections.ca> Sent: 10 February 2021 14:29 To: w3c-wai-ig@w3.org Subject: Invalid ARIA necessarily a WCAG fail? (Role menuitem missing required parent role (group,menu,menubar) Hi, If I find (via an excellent ARIA checker bookmarklet) an issue such as a link with role="menuitem" with no required parent role (group,menu,menubar) present on the page, am I correct to record this as a WCAG fail? Apologies in advance if this is fairly obvious and I just missed it. Thanks. Alan -Alan Bristow Web Programmer Elections Canada alan.bristow@elections.ca
Received on Friday, 12 February 2021 17:17:44 UTC