patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Bug - Table - columns that are not sortable should not have `aria-sort`

Open rhamilto opened this issue 1 year ago • 0 comments

Describe the problem Per the latest W3C specifications and accessibility guidelines, the aria-sort attribute should only have values of “ascending”, “descending”, or “other” to indicate the sort order. If sorting does not exist for the column, no aria-sort attribute should be added. https://github.com/patternfly/patternfly-react/blob/1850cf48db06c9c4459b76a3f4af355671cf9f3e/packages/react-table/src/components/Table/utils/decorators/sortable.tsx#L55 currently outputs a value of "none" for columns that are not sortable but should not.

How do you reproduce the problem? In OpenShift Management Console, upgrade axe-core and cypress-axe to the latest versions, run other-routes.cy.ts, and note the aria-sort="none" accessibility failures.

Expected behavior No aria-sort="none" accessibility issues should be present after upgrading axe-core and cypress-axe to the latest versions in OpenShift Management Console.

Is this issue blocking you? Yes. We cannot upgrade axe-core and cypress-axe in OpenShift Management Console as a result of this bug, which in turn is blocking the ability to upgrade monaco-editor.

Screenshots Screenshot 2024-09-18 at 5 07 11 PM

cc: @logonoff

rhamilto avatar Sep 18 '24 21:09 rhamilto