accessible-autocomplete icon indicating copy to clipboard operation
accessible-autocomplete copied to clipboard

Failing AXE tests

Open spacedmonkey opened this issue 5 years ago • 11 comments

I used the tool axe to scan this autocomplete and got the following errors.

    Expected page to pass Axe accessibility tests.
    Violations found:
    Rule: "aria-input-field-name" (ARIA input fields have an accessible name)
    Help: https://dequeuniversity.com/rules/axe/3.3/aria-input-field-name?application=axe-puppeteer
    Affected Nodes:
      #amp-stories-font-family-picker-1__listbox
        Fix ANY of the following:
        - aria-label attribute does not exist or is empty
        - aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
        - Element has no title attribute or the title attribute is empty
    
    Rule: "aria-required-children" (Certain ARIA roles must contain particular children)
    Help: https://dequeuniversity.com/rules/axe/3.3/aria-required-children?application=axe-puppeteer
    Affected Nodes:
      #amp-stories-font-family-picker-1__listbox
        Fix ANY of the following:
        - Required ARIA child role not present: option

spacedmonkey avatar Sep 18 '19 17:09 spacedmonkey

Another

    Affected Nodes:
      #amp-stories-font-family-picker-5
        Fix ALL of the following:
          - Invalid ARIA attribute value: aria-activedescendant="false".

spacedmonkey avatar Sep 18 '19 17:09 spacedmonkey

Hello @spacedmonkey,

I think the error represented by the rule 'aria-input-field-name' will be resolved by the upcoming 2.0.0 release.

When running axecore 3.3.1 on https://alphagov.github.io/accessible-autocomplete/examples/ I cannot reproduce the rule: "aria-required-children", could you help me reproduce that?

The aria-activedescendant issue seems to be that the value should always be the ID of an another element, and sometimes it gets set to false, so potentially the logic should be to remove the attribute instead of setting it to false.

NickColley avatar Sep 19 '19 09:09 NickColley

Another failing aXe issue we have discovered is "Document has active elements with the same id atrribute". The containing div and the input have the same ID.

robertparkinson avatar Oct 12 '20 15:10 robertparkinson

@nickcolley We are using v2.0.3 and the aria-input-field-name issue is still there. Since this component asks us to render our own label outside this component, I think the fix is to provide a prop where we can pass in the id of that label, and that gets added as the value of aria-labelledby on the <ul>.

We're also seeing the aria-activedescendant=false error and your suggested fix sounds right to me.

sussexrick avatar Jun 17 '21 11:06 sussexrick

I no longer work on this project at the moment so unfortunately I can't help you @sussexrick but hopefully if the maintainers get time they'll follow up with you :)

NickColley avatar Jun 17 '21 12:06 NickColley

@sussexrick - I have a pull-request which fixes the aria-activedescendant=false issue --> https://github.com/alphagov/accessible-autocomplete/pull/497

JakeChampion avatar Jun 28 '21 10:06 JakeChampion

@JakeChampion Thank you. Could be useful for us @bentpr @vrojastpr.

sussexrick avatar Jun 28 '21 15:06 sussexrick

@sussexrick, we have forked accessible-autocomplete and added a few bug fixes such as this one. We published our fork to @financial-times/accessible-autocomplete, the changelogs from v2.1.0 onwards are the changes we've included

JakeChampion avatar Jun 28 '21 15:06 JakeChampion

@bentpr @vrojastpr Let's use @JakeChampion's package and create PRs there for any bugfix we do, rather than publish our own package to npm.

sussexrick avatar Jun 28 '21 15:06 sussexrick

@JakeChampion I've submitted a PR to your fork with a fix for the 'aria-input-field-name' issue. Any chance you could review?

sussexrick avatar Jul 19 '21 15:07 sussexrick

For anyone finding this, PR #500 fixes "aria-input-field-name" (ARIA input fields have an accessible name).

sussexrick avatar Jul 22 '21 09:07 sussexrick