Skip to content

fix(material/dialog): dialog name on mac only using aria-label #29264

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

Closed
wants to merge 13 commits into from

Conversation

essjay05
Copy link
Contributor

Fixes bug with Angular Components Dialog component on Mac whether using Chrome or Firefox the screenreader does not read the dialog name/title unless it is using an aria-label. Updates the dialog-content-directives to read/apply the aria- labelledby and aria-describedby values if they exist.

Fixes b/274674581

@jelbourn jelbourn added the dev-app preview When applied, previews of the dev-app are deployed to Firebase label Jun 14, 2024
Copy link

github-actions bot commented Jun 14, 2024

Deployed dev-app for 119d68b to: https://ng-dev-previews-comp--pr-angular-components-29264-dev-rjpcttjr.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@essjay05 essjay05 force-pushed the dialog-name-title-fix branch 5 times, most recently from 4d12a2a to 9a62391 Compare June 24, 2024 20:17
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch 2 times, most recently from 478e548 to 2342929 Compare June 27, 2024 00:19
@angular-robot angular-robot bot added the area: docs Related to the documentation label Jun 27, 2024
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch from bac212f to c8c15d7 Compare June 27, 2024 22:03
@angular-robot angular-robot bot removed the area: docs Related to the documentation label Jun 27, 2024
@essjay05 essjay05 marked this pull request as ready for review June 27, 2024 22:58
@essjay05 essjay05 requested a review from a team as a code owner June 27, 2024 22:58
@essjay05 essjay05 requested review from amysorto and mmalerba and removed request for a team June 27, 2024 22:58
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch from b830917 to 85be3e2 Compare June 28, 2024 18:57
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch 3 times, most recently from c17c4f0 to 6f11b5c Compare July 3, 2024 18:11
@essjay05 essjay05 requested a review from mmalerba July 9, 2024 20:30
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch 3 times, most recently from 8f902b4 to fbf8f31 Compare July 16, 2024 00:05
@mmalerba mmalerba removed their request for review July 17, 2024 21:30
@essjay05 essjay05 requested a review from mmalerba July 20, 2024 00:58
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch from 7f80749 to 8d66cc2 Compare July 22, 2024 15:25
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch 2 times, most recently from 74c5764 to 0535924 Compare July 30, 2024 15:58
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch 3 times, most recently from 1fccc53 to d550311 Compare August 13, 2024 15:26
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch 4 times, most recently from d3408cb to 735a605 Compare August 22, 2024 05:01
Fixes bug with Angular Components Dialog component on Mac
whether using Chrome or Firefox the screenreader does not
read the dialog name/title unless it is using an aria-label.
Updates the dialog-content-directives to read/apply the aria-
labelledby and aria-describedby values if they exist.

Fixes b/274674581
Fixes Angular Components Dialog component where the dialog name is
not read by VoiceOver/screenreader on macOS chrome & firefox
browsers. Attempts to retrieve any id associated with aria-labelledby
or aria-describedby and taking the innerHTML or the aria-label of that
element and applying that value to the dialog's aria-label.

Fixes b/274674581
…ome or firefox

Fixes bug in Angular Components Dialog component where the aria-labelledby
and aria-describedby values are not being read by Chrome or Firefox when
using a mac. This checks if there is an html attribute of aria-labelledby
or aria-describedby and grabs the innerText or aria-label value and uses
that value as the aria-label for the dialog only on mac using chrome or
firefox.

Fixes b/274674581
…ome and firefox

Fixes Angular Components Dialog component where the mac screenreader is not
reading the associated aria-labelledby id value as the dialog name/title.
Fixes logic checking for macos so that the function_getDialogName() gets
called when the value of the arialabelledby id element gets inserted into
the aria-label value.

Fixes b/274674581
Cleans up fix for Angular Component Dialog component's fix to update
the dialog aria-label if the user's OS is a mac since mac using a
chrome or firefox browser the screenreader does NOT read the dialog
name if the value is portrayed by aria-labelledby or aria-describedby.
Cleaned up console logs and unused attributes.

Fixes b/274674581
…ome or firefox

Cleans up unused variables and comments.

Fixes b/274674581
…sing chrome or firefox

Updates fix for Angular Components Dialog issue where the dialog name
is not being read by the screenreader when specifically using macos
(and potentially ios) screenreader when using chrome or firefox
browsers. Removes unused commented out code and includes ios as part
of the logic to call  _getDialogName().

Fixes b/274674581
…ome or firefox

Adds console.log tests to check new additions to Platform CDK
which will be used for dialog name fix instead of previous logic.

Fixes b/274674581
…efox

Updates previous fix adding Windows and Linux checks to Platform CDK
and replaces windows.navigator.userAgent with using Platform CDK
check.

Fixes b/274674581
Updates fix for Angular Components Dialog component to revert
previous changes to aria-describedBy value to what it previously
was to not upgrade its value to aria-label. Fixes _getDialogName
function to return a string which gets applied to the ariaLabel
config value.

Fixes b/274674581
Updates previous fix to Angular Components Dialog component
to remove unnecessary to our fix platform checks for WINDOWS
and LINUX. Simplifies logic to check for platform in material/
dialog-container.

Fixes b/274674581
Updates previous fix and removes unused import to fix lint error.
… adoption

Updates to put aria-labelledby values as the priority and the aria-label as
the backup.
@essjay05 essjay05 force-pushed the dialog-name-title-fix branch from 735a605 to 119d68b Compare August 23, 2024 16:25
@essjay05
Copy link
Contributor Author

essjay05 commented Oct 4, 2024

Reverting this PR and closing as it looks like the aria-labelledby bug is specific to MacOS+Firefox even on a plain HTML/CSS/Vanilla Javascript Dialog and is not due to Angular Components.

@essjay05 essjay05 closed this Oct 4, 2024
@essjay05 essjay05 deleted the dialog-name-title-fix branch October 4, 2024 18:51
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dev-app preview When applied, previews of the dev-app are deployed to Firebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants