Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

fix(toast): add missing a11y context. See #349 #6002

Merged
merged 1 commit into from
Dec 2, 2015

Conversation

jelbourn
Copy link
Member

@jelbourn jelbourn commented Dec 1, 2015

@@ -213,7 +213,9 @@ function MdToastProvider($$interimElementProvider) {
var opts = {
template: [
'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}">',
'<span flex>{{ toast.content }}</span>',
'<span flex role="alert" aria-relevant="all" aria-atomic="true">' +
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't actually work, because the Toast is inserted and then removed–ARIA Live Regions have to be present at load time and remain in the page to be picked up by screen readers. We talked a while back about creating a global messaging directive for this purpose–could that be incorporated here? #3174

Copy link
Member Author

Choose a reason for hiding this comment

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

My testing showed that this worked with NVDA on Firefox and VoiceOver with Safari.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's good, there is some support then! I did find the toasts were not announced in JAWS with IE or Chrome and Voiceover. JAWS would be more important, while Chrome isn't used with VO as much as Safari.

@jelbourn jelbourn merged commit 037e376 into angular:master Dec 2, 2015
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.

2 participants