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

Address accessibility issues in management apps #45024

Merged
merged 8 commits into from
Sep 13, 2019

Conversation

alisonelizabeth
Copy link
Contributor

This PR addresses accessibility issues across multiple management apps.

Fixes #43842

  • [IM] Added <caption> to indices table
  • [IM] Added labels to checkboxes on indices table
  • [IM] Incorporated the “Show phase definition” button in the index details flyout into the description list

Screen Shot 2019-09-06 at 1 04 55 PM

  • [ILM] Added <caption> to index lifecycle policies table
  • [Rollup] Added labels to time widget used in cron editor plugin
  • [Rollup] Fixed description lists used in rollup summary tab

Other things to note:

  • There was a comment about the accessibility of the filter buttons used within the indices table. I think this is best addressed within EUI and found an issue related to this already ([Accessibility] EuiContextMenu does not behave like navigation lists in the screen reader eui#1585).
  • There were several comments about changing the first <td> in a table row to a <th> with scope=“row”. AFAIK this is not possible with the <EuiInMemoryTable/>. I addressed this for the indices and index lifecycle policies table (different setup than other apps), but I’m also wondering if this is necessary? I don’t have enough knowledge in this area, so would appreciate any thoughts. I can open up an issue against EUI if we feel it’s something we should do.

@alisonelizabeth alisonelizabeth added v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v7.5.0 labels Sep 6, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@alisonelizabeth
Copy link
Contributor Author

retest

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this @alisonelizabeth! I found a couple things that I think we need to fix. @barlowm Would you please review this and make sure the issues you found have been resolved?

scope="row"
data-test-subj={`policyTableCell-${fieldName}`}
>
<div className={`euiTableCellContent policyTable__content----${fieldName}`}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think policyTable__content---- contains a typo and should be policyTable__content--.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, fixed!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjcenizal I really can't give a call on if the issues have been resolved at this point. If you want to have a conference call where I can look at a screen share of the app running I'd be able to give a better call on that. Hit me up on slack if you'd like to do that.


if (fieldName === 'name') {
return (
<th
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, EUI would publish a component we can use here, or provide props on EuiTableRowCell that allow it to provide the accessibility affordances you're adding here. Would you mind creating an issue and cross-linking to this code as an example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, agreed. I was looking through the existing EUI issues before I went ahead and opened one and it looks like you created a similar/related issue in the past 😀

See: elastic/eui#1030

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure if that issue covers the requirements you're meeting with this particular change. If I understand correctly, that issue is about announcing each column header before reading the content of a particular cell. This helps users understand the meaning of the cell's content. For example, if a cell contained an address "123 ABC Street", and that column header was "Address", the screen-reader would announce "Address: 123 ABC Street".

But I believe the problem raised in #43842 was that the "Name" column (or some other identifying column) is also used to identify each row. This provides additional context so that you know which entity each cell is referring to. In my example above, if there was also a "Name" column and the content for that row was "Anastasia Romanov" then it sounds like somehow the screen-reader would connect "Anastasia Romanov" and "123 ABC Street". But to be honest, I'm not sure I understand how that works.

@barlowm Could you please clarify this for us?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjcenizal - You're correct. Screen readers (such as JAWS and NVDA) provide the ability to navigate to individual colums randomly. And without a "scope=row" (which as of HTML5 can only be applied to a TH tag) the screenreader user won't know what row a given cell is associated with. See WebAIM's article on Creating Accessible Tables.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjcenizal @barlowm thanks for the explanation! Opened elastic/eui#2335

role="status"
aria-relevant="text"
aria-live="polite"
className="euiScreenReaderOnly"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use the EuiScreenReaderOnly component here instead of using the CSS class? The comment applies in other places this classname is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, good call. fixed.

aria-label={i18n.translate('xpack.idxMgmt.indexTable.selectIndexAriaLabel', {
defaultMessage: 'Select this row'
})}
title={i18n.translate('xpack.idxMgmt.indexTable.selectIndexTitle', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is title necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I don't think so. I removed it (can't remember why I originally added it).

@@ -52,6 +53,9 @@ export const CronDaily = ({
<EuiSelect
options={hourOptions}
value={hour}
label={i18n.translate('esUi.cronEditor.cronDaily.hourSelectLabel', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be aria-label for it to be read aloud by a screen-reader. I used VoiceOver to test this, and it won't announce these values unless I change them to aria-label.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I changed this to aria-label and tested with voiceover.

@cjcenizal cjcenizal requested a review from barlowm September 10, 2019 21:59
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@alisonelizabeth
Copy link
Contributor Author

@cjcenizal I believe I addressed all of your comments. Mind taking another look when you get a chance? Thanks!

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, code LGTM! Great work, Alison! Thank you so much for doing this.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@alisonelizabeth
Copy link
Contributor Author

Retest

@alisonelizabeth
Copy link
Contributor Author

@alisonelizabeth
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ILM Feature:Index Management Index and index templates UI Feature:Rollups release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Accessibility) - ES Management (high-level multiple issues)
4 participants