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

Fix: screen reader support and focus indication on links #625

Merged
merged 7 commits into from
Jul 9, 2020

Conversation

ElinorW
Copy link
Collaborator

@ElinorW ElinorW commented Jul 2, 2020

Overview

  • Added aria-live tag on the status message, to enable the screen reader to read the message.

  • Added an aria-label for the dismiss button on the status message and the terms of use message bar .

  • Enabled multiline functionality on the terms of use message bar for better focus on the links when using keyboard navigation.

Demo

image

Notes

Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.

Testing Instructions

To test the status message accessibility
Ensure a screen reader is activated (e.g Narrator)

Step 1: Launch the application on your browser.
Step 2: Navigate to “Run Query” buttons using tab key and activate it by pressing enter key.
Step 3: Observe screen reader is narrating “Status” message.

To test the focus indication on the links
Step 1: Launch the application on your browser.​
Step 2: Navigate to 'Microsoft APIs Terms of Use' and 'Microsoft Privacy Statement' link by using tab key.
Step 3: Observe that a focus indicator is clearly visible.

@ElinorW ElinorW requested a review from jobala July 2, 2020 09:06
@ElinorW ElinorW self-assigned this Jul 2, 2020
@@ -4,7 +4,8 @@ import { FormattedMessage } from 'react-intl';
export function statusMessages(queryState: any, actions: any) {
return queryState && (
<MessageBar messageBarType={queryState.messageType}
isMultiline={false} onDismiss={actions.clearQueryStatus}>
isMultiline={false} onDismiss={actions.clearQueryStatus}
dismissButtonAriaLabel='Close' aria-live={'assertive'}>
Copy link
Contributor

@jobala jobala Jul 2, 2020

Choose a reason for hiding this comment

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

You can improve readability by arranging the props as shown below.

<MessageBar
  messageBarType={}
  isMultiline={}
  onDismiss={}
>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh yeah, thank you for this

@ElinorW ElinorW requested a review from jobala July 3, 2020 13:27
@@ -4,7 +4,10 @@ import { FormattedMessage } from 'react-intl';
export function statusMessages(queryState: any, actions: any) {
return queryState && (
<MessageBar messageBarType={queryState.messageType}
isMultiline={false} onDismiss={actions.clearQueryStatus}>
isMultiline={false}
Copy link
Contributor

Choose a reason for hiding this comment

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

Indent by two spaces 😉

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 we should add a pre-commit hook that runs prettier no? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we should.

@ElinorW ElinorW requested a review from jobala July 6, 2020 14:12
isMultiline={false} onDismiss={actions.clearQueryStatus}>
isMultiline={false}
onDismiss={actions.clearQueryStatus}
dismissButtonAriaLabel='Close'
Copy link

Choose a reason for hiding this comment

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

how does a screen handle this on a localized page?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The screen reader is able to read it as well on a localized page

Copy link

Choose a reason for hiding this comment

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

yes but does it read the english word or is it localized.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's localized

Copy link
Collaborator

@thewahome thewahome left a comment

Choose a reason for hiding this comment

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

LGTM

@ElinorW ElinorW merged commit 5268204 into dev Jul 9, 2020
@thewahome thewahome added this to the Next release candidate milestone Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants