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

[a11y] stream entry within log stream #183666

Merged
merged 14 commits into from
May 29, 2024
Merged

Conversation

rshen91
Copy link
Contributor

@rshen91 rshen91 commented May 16, 2024

Summary

Closes https://github.com/elastic/observability-dev/issues/3349

Checklist

Delete any items that are not applicable to this PR.

@rshen91 rshen91 added the accessibility: cognition Accessibility issues including cognition, awareness, understanding label May 16, 2024
@rshen91 rshen91 self-assigned this May 16, 2024
@rshen91
Copy link
Contributor Author

rshen91 commented May 17, 2024

/ci

@rshen91 rshen91 added Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) labels May 17, 2024
@rshen91 rshen91 requested a review from 1Copenut May 22, 2024 14:12
@rshen91 rshen91 marked this pull request as ready for review May 22, 2024 14:12
@rshen91 rshen91 requested a review from a team as a code owner May 22, 2024 14:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label May 22, 2024
@rshen91 rshen91 added the release_note:skip Skip the PR/issue when compiling release notes label May 22, 2024
Copy link
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

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

@rshen91 I requested a new approach for this PR based on the originating issue Bhavya wrote. I found a way to get the axe-core errors to drop and make screen readers honor the layout closer to an actual table. LMK if you have any questions or would like to pair on a next iteration. Thank you!

@@ -222,6 +222,7 @@ export class ScrollableLogTextStreamView extends React.PureComponent<
onExtendRange={(newDateExpression) =>
updateDateRange({ startDateExpression: newDateExpression })
}
aria-owns="streamEntry logTextStreamEntry"
Copy link
Contributor

Choose a reason for hiding this comment

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

I took a look at the originating issue again. I think what Bhavya was reporting was the Logs div[role="row"] "table rows" need a parent role="table". I quickly adjusted line 160 and added that role, then ran axe-core again. The error went away after I added the role and added aria-hidden="true" to both HR tags.

! scrollable_log_text_stream_view.tsx#160

+ <ScrollableLogTextStreamViewWrapper role="table">
- <ScrollableLogTextStreamViewWrapper>
! scrollable_log_text_stream_view.tsx#225

- aria-owns="streamEntry logTextStreamEntry"

@@ -31,6 +31,7 @@ export const LogEntryRowWrapper = euiStyled.div.attrs(() => ({
export interface LogEntryRowWrapperProps {
scale: TextScale;
isHighlighted?: boolean;
alt: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

The alt won't be needed here to fix the originating issue. We're showing text on the page which is a great start. The trick is making screen readers understand that text is structured like a table, so they know how to parse individual rows and cells.

Comment on lines 178 to 180
alt={i18n.translate('xpack.logsShared.streamEntry.altText', {
defaultMessage: 'stream entry within log stream',
})}
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove this internationalization prop and its type too.

Copy link
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

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

💯 LGTM! I pulled your branch right before EOD and re-tested with axe-core and VoiceOver + Safari. No automated code violations, and the logs stream announced itself as a table properly. Most importantly, I was able to traverse the table using VO shortcuts. This gives me high confidence that NVDA and JAWS will also provide a good table navigation experience for users. Thanks Rachel!

@rshen91 rshen91 enabled auto-merge (squash) May 28, 2024 13:26
@rshen91 rshen91 changed the title [a11y] use alt text to convey stream entry within log stream [a11y] stream entry within log stream May 28, 2024
@kibana-ci
Copy link
Collaborator

kibana-ci commented May 29, 2024

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
logsShared 54.9KB 54.9KB +69.0B

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5412 +5412
total size - 8.8MB +8.8MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @rshen91

Copy link
Contributor

@yngrdyn yngrdyn left a comment

Choose a reason for hiding this comment

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

LGTM

@rshen91 rshen91 merged commit 4741e29 into elastic:main May 29, 2024
26 checks passed
@kibanamachine kibanamachine added v8.15.0 backport:skip This commit does not require backporting labels May 29, 2024
rshen91 added a commit to rshen91/kibana that referenced this pull request May 30, 2024
…#183666)

## Summary

Closes elastic/observability-dev#3349


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility: cognition Accessibility issues including cognition, awareness, understanding backport:skip This commit does not require backporting ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants