Deque releases axe-core 4.1
Today Deque released version 4.1.0 of axe-core. The goal of this release was to address long-standing issues and gaps. This involved adding several new rules that have been on our bucket list for several years now. We also decided to tackle an accumulating list of rare false positives, to bring the number of known false positives in axe-core back down to zero.
New rules for ARIA
Axe-core version 4.1.0 comes with 6 new rules that test for accessible names of different types of ARIA components. Rules are grouped based on how they map to WCAG. These six follow the same pattern; Elements with a
role attribute that have this value need to have an accessible name, either using an
aria-label, aria-labelledby or
title attribute, or in some cases by the content of the element.
Adding an accessible name to these components ensures that users with assistive technologies can understand the purpose of these rules. The following table shows the rules that were added:
|Rule ID||ARIA Roles tested||Test for||Name from content|
|aria-command-name||link, button, menuitem||Criterion 4.1.2||Yes|
|aria-dialog-name||dialog, alertdialog||Best practice||No|
button roles were previously tested in different rules. This was changed to provide a better remediation message. Additionally the HTML
select element is now tested in a new
select-name rule, instead of the
Avoid presentational role conflict
The last rule that is new in axe-core 4.1.0 is the
presentation-role-conflict best practice rule, provided to us by outside contributor Sam Lee (thank you Sam!). This rule checks that when you are using a
role attribute with
none, it is used in a way that will not be ignored by browsers and assistive technologies. This can happen when the element uses a global ARIA attribute, such as
aria-live. Presentation roles also get ignored on elements that are focusable. Because of this, putting
role=none on a
button element will be ignored unless the button is also
disabled. Using this rule you will know for sure that if you set
role=presentation, it will be treated as such.
Fixing false positives
Our well known mantra of axe-core is that we will treat false positives as bugs. If you find one and tell us about it, we will fix it. Axe-core is currently downloaded several million times every week, so even very rare types of bugs get reported. These accumulated for a while as we were developing axe-core version 4.0. For the 4.1 release we’ve put our heads down and resolved (almost) every single known false positive. Some of the edge case false positives that were fixed include:
- Account for background colors of pseudo-elements in
- Links wrapping a landmark should get its name from the content of the landmark if it does not have an accessible name. (issue 1461)
- Ignore empty SVG elements in the region rule (issue 1832)
- Allow CSS
text-shadowto function as an outline of text for color-contrast (issue 2541)
role=buttonshould allow alt attributes (issue 2577)
Our goal was to get the false positives back down to zero. We did not quite manage this for the 4.1.0 release, but expect these last three to also be addressed in an upcoming patch release. For a complete list of fixes, check out the axe-core changelog.
Some other noteworthy changes in axe-core 4.1.0:
- In order to keep axe-core running as fast as possible, we reduced the file size of axe-core. At 108kb, axe-core 4.1.0 is 30kb smaller than axe-core 4.0 was.
- Results in iframes are now sorted according to where the iframe appears in the page, instead of putting the iframe results at the bottom of the results list.
- The W3C has published seven more ACT rules. The “ACT” tag was added to the axe-core rules that correspond to those seven ACT rules.
This year axe-core participated in hacktoberfest for the second time. An event in the month of October, where participants can get a free limited edition t-shirt or plant a tree for contributing to open source projects. This year we had 11 people contribute to axe-core. Our thanks goes out to the following GitHub users: Bracciata, DSanz, Eps1lon, mDalessandro, GilGold, IMccausl, LoganRas, RedGardner, ShankarShastri, StevenDufresne, and TimmyBytes. Not part of Hacktoberfest but equally appreciated 42tte, for several contributions to axe-core 4.1.
Axe-core 4.1 in other axe products
Axe-core 4.1.0 is currently available on NPM. Anyone using axe-core as part of either axe DevTools APIs or any of the open source axe-core integrations can start to use axe-core 4.1.0 today. Other axe products, including axe Extension, axe Expert extension, axe Auditor and axe Monitor will release an update with axe-core 4.1 in the next few weeks.