Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensures every ARIA button, link and menuitem has an accessible name validation error in demo flights chart #148647

Closed
bhavyarm opened this issue Jan 10, 2023 · 7 comments · Fixed by #151678
Assignees
Labels
bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:Accessibility Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Jan 10, 2023

Description

Dashboard controls a11y tests Add controls panel
Screen Shot 2023-01-10 at 8 32 04 PM

Failures in tracked branches: 0

Buildkite Job
https://buildkite.com/elastic/kibana-pull-request/builds/98892#018597d8-1389-415d-9554-d5abd16545b4

Error: a11y report:

VIOLATION
  [aria-command-name]: Ensures every ARIA button, link and menuitem has an accessible name
    Impact: serious
    Help: https://dequeuniversity.com/rules/axe/4.6/aria-command-name?application=axeAPI
    Elements:
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-Security Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-Weather Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-Carrier Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-Late Aircraft Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-NAS Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-No Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">

Related Issues

@bhavyarm bhavyarm added bug Fixes for quality problems that affect the customer experience Project:Accessibility Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Project:Controls labels Jan 10, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-accessibility (Project:Accessibility)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@bhavyarm
Copy link
Contributor Author

Another test failing with same violation in controls a11y test suite -

X-Pack Accessibility Tests
x-pack/test/accessibility/apps/dashboard_controls.ts
Dashboard controls a11y tests Open data view picker

Failures in tracked branches: 0

Buildkite Job
https://buildkite.com/elastic/kibana-pull-request/builds/98892#018597d8-1389-415d-9554-d5abd16545b4

Error: a11y report:

VIOLATION
  [aria-command-name]: Ensures every ARIA button, link and menuitem has an accessible name
    Impact: serious
    Help: https://dequeuniversity.com/rules/axe/4.6/aria-command-name?application=axeAPI
    Elements:
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-Security Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-Weather Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-Carrier Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-Late Aircraft Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-NAS Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">
      - <div tabindex="0" role="button" aria-pressed="false" data-test-subj="legend-No Delay" style="display: flex; justify-content: center; align-items: center; height: 100%; margin-left: 4px; margin-right: 4px;">

@Heenawter Heenawter added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort labels Jan 10, 2023
@1Copenut
Copy link
Contributor

There's a great opportunity here to make these markers on the flight delay visualization (or any markers) more accessible and solve the axe violation. I see two parts:

  1. Give each button marker a proper aria-label with i18n translation
  2. Wrap the buttons in an ordered list that builds an accessible label
<h2 data-test-subj="dashboardPanelTitle" class="embPanel__title">
  <span id="if8987510-9122-11ed-82b7-3b342ea4f0bc" class="css-hus3oj-euiScreenReaderOnly">
    Dashboard panel: [Flights] Delays &amp; Cancellations
  </span>
  <span class="embPanel__titleInner">
    <span class="embPanel__titleText">[Flights] Delays &amp; Cancellations</span>
  </span>
</h2>

...

! The OL will give screen reader users two pieces of context:
! 1. What information the list items will present
! 2. How many list items are available to be read back
! aria-label string will need to be built up in a `const` as string "[Flights] Delays and Cancellations Markers"
! Screen reader will announce "[Flights] Delays and Cancellations Markers, list, 20 items"

+ <ol aria-label="[Flights] Delays and Cancellations Markers">
+   <li>
      <button
!       Marker numbers should increase sequentially
+       aria-label="Delays and Cancellations Marker 1"
        class="echAnnotation__marker"
        type="button"
      >
        <div class="echAnnotation__icon">
          <svg
            aria-hidden="true"
            class="euiIcon css-2txxin-euiIcon-m"
            height="16"
            role="img"
            viewbox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"
          >
            <path d="M7.59 10.059L7.35..." fill-rule="evenodd"></path>
          </svg>
        </div>
      </button>
+   </li>

! Other button markers wrapped in LIs

+ </ol> 

@Heenawter
Copy link
Contributor

Heenawter commented Feb 10, 2023

Looking in to this, and it looks like the a11y issues are actually related to the legend items of the [Flights] Delay Type chart underneath the controls flyout, and not the controls flyout itself... I ran an Axe scan and I don't see any a11y concerns specifically about the controls creation/editor flyout.

image

@bhavyarm Unless I'm missing something, is it fair to re-assign this to the Vis team and update the issue to reflect that this isn't a controls issue?

@Heenawter Heenawter changed the title Ensures every ARIA button, link and menuitem has an accessible name validation error in dashboard controls Ensures every ARIA button, link and menuitem has an accessible name validation error in demo flights chart Feb 16, 2023
@Heenawter Heenawter added Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed Project:Controls labels Feb 16, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations)

@Heenawter Heenawter removed their assignment Feb 16, 2023
@markov00
Copy link
Member

This is configured in Lens src/plugins/chart_expressions/expression_xy/public/components/legend_action_popover.tsx

@stratoula stratoula self-assigned this Feb 21, 2023
@ThomThomson ThomThomson removed the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Feb 21, 2023
stratoula added a commit that referenced this issue Feb 22, 2023
## Summary
Closes #148647

Fixes accessibility problem on legend actions button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:Accessibility Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants