Components: bug(material-select): Failing accessibility score due to aria roles

Created on 15 Dec 2020  路  5Comments  路  Source: angular/components

Reproduction

Steps to reproduce:

  1. Navigate to https://material.angular.io/components/select/overview
  2. Go to examples
  3. Run a plugin which checks accessibility scores of a page.
    I ran axe and lighthouse (lighthouse I believe is always included in google chrome) and both are failing on aria roles.

Expected Behavior

Accessibility score of 100

Actual Behavior

Accessibility score of 91 (lighthouse which is included in google chrome)
Schermafbeelding 2020-12-15 om 11 16 01

The axe plugin is telling me as follows:
Fix the following:
Required ARIA child role not present: textbox.
For each of the mat-selects on the page.

I'm seeing same results on my app, which is running with @angular/material 10.2.7 and latest of angular 10.x.x.

Currently the role of the mat-select is combobox, which according to documentation of a11y indeed requires a child role of textbox: https://www.digitala11y.com/combobox-role/

Environment

  • Angular: latest of 10.x.x and whatever is running in the documentation
  • CDK/Material: 10.2.7 and 11.0.3
  • Browser(s): I am using google chrome latest
P2 a11y materiaselect

Most helpful comment

This is working as expected and accessibility checking tools haven't been updated to account for the new pattern. See the discussion after https://github.com/angular/components/pull/20082#issuecomment-686622547.

All 5 comments

The warning occurs because of the following unmet requirement

https://www.w3.org/TR/wai-aria-1.1/#combobox

Authors MUST ensure an element with role combobox contains or owns a text input element with role textbox or searchbox and that the text input has aria-multiline set to false.

Adding an input element with role="textbox" in the select template fixes the issue.

Note: for ARIA 1.2, the textbox is not required anymore:
https://www.w3.org/TR/wai-aria-1.2/#combobox

This is working as expected and accessibility checking tools haven't been updated to account for the new pattern. See the discussion after https://github.com/angular/components/pull/20082#issuecomment-686622547.

thanks! :)

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alanpurple picture alanpurple  路  3Comments

jelbourn picture jelbourn  路  3Comments

kara picture kara  路  3Comments

savaryt picture savaryt  路  3Comments

RoxKilly picture RoxKilly  路  3Comments