Skip to content

Fixing accessibility issue: #4295#4296

Merged
cschlechty merged 3 commits intomicrosoft:masterfrom
b-priyank:patch-1
Mar 20, 2018
Merged

Fixing accessibility issue: #4295#4296
cschlechty merged 3 commits intomicrosoft:masterfrom
b-priyank:patch-1

Conversation

@b-priyank
Copy link
Copy Markdown
Contributor

@b-priyank b-priyank commented Mar 16, 2018

Promise based TextField error message is not read by firefox + NVDA

Pull request checklist

Description of changes

aria-live="assertive" attribute should be defined on a statically available element. Error message may be loaded dynamically inside that element. For TextField, this attribute was added to DOM dynamically. In order to announce message in live region, Assistive Technology (NVDA) need to detect some element with aria-live defined. Then it announces any message loaded dynamically inside it.

Focus areas to test

All error message combinations for TextField with:
EDGE + Narrator
FireFox + NVDA

Promise based TextField error message is not read by firefox + NVDA
@msftclas
Copy link
Copy Markdown

msftclas commented Mar 16, 2018

CLA assistant check
All CLA requirements met.

{ this._isDescriptionAvailable &&
<span id={ this._descriptionId }>
{ description && <span className={ css('ms-TextField-description', styles.description) }>{ description }</span> }
<div aria-live='assertive'>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't this move into the errrorMessage condition block? Otherwise we just add a div there with no content unnecessarily.

Also changes need a change file. Try running npm run change from the root to generate one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was not working with NVDA old version. However, I updated to latest version 2018.1 and it is working fine. So, moved div into errorMessage condition block. Updated change file as well. Verified on firefox + NVDA and EDGE + narrator. Thanks.!

{ description && <span className={ css('ms-TextField-description', styles.description) }>{ description }</span> }
{ errorMessage &&
<div>
<div aria-live='assertive'>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@cschlechty is this reasonable?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yep

@cschlechty cschlechty merged commit 376e93e into microsoft:master Mar 20, 2018
@b-priyank b-priyank deleted the patch-1 branch March 21, 2018 04:54
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Promise based TextField error message is not read by firefox + NVDA

4 participants