-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(): add aria live announcer #238
Conversation
56be961
to
a3836d5
Compare
|
||
// This hides the announcer element visually. | ||
// That means it's still accessible for screen-readers but not visible. | ||
._md-aria-announcer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can omit the underscore from the name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes right, seems to be unnecessary, because of the view encapsulation.
cc @marcysutton in case you're interested :) |
a2d1ccd
to
1e55ee7
Compare
@@ -0,0 +1,37 @@ | |||
# MdAriaLive |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The readme still uses aria-live
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, shameful. I was sure to change that.
62faa49
to
d1acbaf
Compare
@devversion sorry to change course on you with this PR, but I talked with hansl@ and we realized that doing this as a service would actually make more sense.
The service would be responsible for making its own DOM element and appending it to the document body (and also checking whether there is already an announcer element present). |
@jelbourn That's no problem. I will change that as soon as possible and ping you. (lot of stress atm) |
@devversion No worries! We don't have any immediate need for this. |
d1acbaf
to
7b52d5a
Compare
9127440
to
72f9fef
Compare
@jelbourn Updated it. Please take a look again. |
@Injectable() | ||
export class MdLiveAnnouncer { | ||
|
||
private announcerEl: Element; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about _liveElement
?
72f9fef
to
3883045
Compare
LGTM |
@devversion Just notices one last thing from CI: IE11 doesn't support |
3883045
to
96536d9
Compare
* Removes the static messages, which should be detected by the screenreaders * Introduces a Screenreader Announcer service (as in Material 2 - angular/components#238) * Service can be used for other components as well (e.g Toast, Tooltip) Fixes angular#9603.
* Removes the static messages, which should be detected by the screenreaders * Introduces a Screenreader Announcer service (as in Material 2 - angular/components#238) * Service can be used for other components as well (e.g Toast, Tooltip) Fixes #9603.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #106