-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(material/dialog): update aria-labelledby if title is swapped #27609
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
Conversation
@@ -145,7 +145,7 @@ function parseCssTime(time: string | number | undefined): number | null { | |||
'[attr.aria-modal]': '_config.ariaModal', | |||
'[id]': '_config.id', | |||
'[attr.role]': '_config.role', | |||
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy', | |||
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledByQueue[0]', |
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.
Note that aria-labelledby
supports passing a list of IDs so we could've also used all the IDs here, but I think that for the dialog case it makes sense to only have one label at a time.
6c3dda0
to
0f99294
Compare
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.
Weird to have to use a queue but I see why
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.
LGTM
0f99294
to
dd50f2e
Compare
Currently the dialog assigns the ID of the title as the `aria-labelleledby` of the container, but it doesn't update it if the title is swapped out or removed. These changes add a queue of possible IDs that the container can use as titles are being created or destroyed. Fixes angular#27599.
dd50f2e
to
40a011a
Compare
) Currently the dialog assigns the ID of the title as the `aria-labelleledby` of the container, but it doesn't update it if the title is swapped out or removed. These changes add a queue of possible IDs that the container can use as titles are being created or destroyed. Fixes #27599. (cherry picked from commit 642d886)
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. |
Currently the dialog assigns the ID of the title as the
aria-labelleledby
of the container, but it doesn't update it if the title is swapped out or removed.These changes add a queue of possible IDs that the container can use as titles as they are being created or destroyed.
Fixes #27599.