equal-access icon indicating copy to clipboard operation
equal-access copied to clipboard

[BUG]: false positives reported for menuitem-menu and option-listbox relation

Open shunguoy opened this issue 3 years ago • 2 comments

Project

a11y checker engine

Browser

Firefox

Operating system

No response

Description

Hi, I'm using the IBM Equal Access Accessibility Checker Firefox add-on (version 3.1.14). I'm wondering why it reports violations in the following cases:

  • <li role="menuitem"> elements, even though their parent is a <ul role="menu"> element
  • <li role="option"> elements, even though their parent is a <ul role="listbox"> element

The menuitem violations say: 4.1.2 Name, Role, Value The element with role "menuitem" is not contained in or owned by an element with one of the following roles: "group, menu, menubar" The option violations say: 4.1.2 Name, Role, Value The element with role "option" is not contained in or owned by an element with one of the following roles: "group, listbox" I use the default settings ie: Currently active: Latest Deployment Currently active: IBM Accessibility But when I changed the rule set deployment date in the add-on options, I noticed:

  • the menuitem violations start being reported with the 2021/04/27 deployment
  • the option violations start being reported with the 2021/10/25 deployment (edited)

Steps to reproduce

this issue can be reproduced from an internal product site. A smaller test case is needed for further investigation.

https://codesandbox.io/s/issue-643-lee7q?file=/index.html

shunguoy avatar Jan 26 '22 22:01 shunguoy

https://njcwb.csb.app/

shunguoy avatar Jan 27 '22 18:01 shunguoy

Notice that the element with role='button' contains menu items. A button is a ‘singular’ element, and it shouldn’t contain any focusable/interactive content. However, the checker should report this as an error.

shunguoy avatar Jan 27 '22 18:01 shunguoy

for Phil to review: https://github.com/IBMa/equal-access/pull/1565

shunguoy avatar Jul 26 '23 14:07 shunguoy