You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on a project that included showmore.js, automated accessibility tests (carried out with Axe) were failing, with the "Elements must only use allowed ARIA attributes" issue.
This seemed to be due to the aria-expanded attribute being applied to the showmore container element as well as the showmore-generated button element. Looking at https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded, the aria-expanded attribute should be added to the button element, which is happening correctly, but it does not need to be added to the container element.
The addition of aria-expanded on the container is used by code to affect behaviour, so if it is replaced with a different/custom attribute, the functionality will continue to work, without triggering an accessibility test failure.
The text was updated successfully, but these errors were encountered:
Working on a project that included
showmore.js
, automated accessibility tests (carried out with Axe) were failing, with the "Elements must only use allowed ARIA attributes" issue.This seemed to be due to the
aria-expanded
attribute being applied to the showmore container element as well as the showmore-generated button element. Looking at https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded, thearia-expanded
attribute should be added to the button element, which is happening correctly, but it does not need to be added to the container element.The addition of
aria-expanded
on the container is used by code to affect behaviour, so if it is replaced with a different/custom attribute, the functionality will continue to work, without triggering an accessibility test failure.The text was updated successfully, but these errors were encountered: