Skip to content

Include axe checks in clone_button_spec.rb

Annabel Dunstone Gray requested to merge 430167-clone-button into master

What does this MR do and why?

Include axe checks in spec/features/projects/show/clone_button_spec.rb feature test

Failures
Failures:

  1) Projects > Show > Clone button when checking project main page user with an admin role sees clone button
     Got 1 failure and 1 other error:

     1.1) Failure/Error: expect(page).to be_axe_clean.within('.clone-options-dropdown')

            Found 3 accessibility violations:

            1) aria-required-parent: Certain ARIA roles must be contained by particular parents (critical)
                https://dequeuniversity.com/rules/axe/4.6/aria-required-parent?application=axeAPI
                The following 1 node violate this rule:

                    Selector: .dropdown-menu-large > .gl-dropdown-item[role="menuitem"]
                    HTML: <li class="gl-dropdown-item" role="menuitem">
                    Fix any of the following:
                    - Required ARIA parents role not present: menu, menubar, group

            2) heading-order: Heading levels should only increase by one (moderate)
                https://dequeuniversity.com/rules/axe/4.6/heading-order?application=axeAPI
                The following 1 node violate this rule:

                    Selector: .dropdown-menu-large > .gl-dropdown-item[role="menuitem"] > h3
                    HTML: <h3 class="h5 m-0 dropdown-bold-header">Download source code</h3>
                    Fix any of the following:
                    - Heading order invalid

            3) list: <ul> and <ol> must only directly contain <li>, <script> or <template> elements (serious)
                https://dequeuniversity.com/rules/axe/4.6/list?application=axeAPI
                The following 1 node violate this rule:

                    Selector: .dropdown-menu-large
                    HTML: <ul class="dropdown-menu dropdown-menu-large clone-options-dropdown dropdown-menu-right show" data-testid="clone-dropdown-content" x-placement="top-end" style="position: absolute; transform: translate3d(400px, -343px, 0px); top: 0px; left: 0px; will-change: transform;">
                    Fix all of the following:
                    - List element has direct children that are not allowed: [role=menuitem]

✂️ UX Paper Cuts 16.8 → Accessibility (#424396 - closed)

Include axe checks in `spec/features/projects/s... (#430167 - closed)

Edited by Annabel Dunstone Gray

Merge request reports

Loading