Skip to content
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

Update a11y.js for 2025 #141

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/a11y.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ return JSON.stringify({
};
}),
screen_reader_classes: captureAndLogError(() => {
return document.querySelectorAll('.sr-only, .visually-hidden').length > 0;
return document.querySelectorAll('.sr-only, .visually-hidden', '.screen-reader-text', 'element-invisible').length > 0;

Choose a reason for hiding this comment

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

I believe this should be .element-invisible, per https://www.drupal.org/node/2022859

Copy link
Author

Choose a reason for hiding this comment

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

Oops.. Thanks @joedoleson..

Copy link
Author

Choose a reason for hiding this comment

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

Oops.. Thanks @joedoleson..

}),
form_control_a11y_tree: captureAndLogError(() => {
const attributes_to_track_regex = /^(aria-.+|type|id|name|placeholder|accept|autocomplete|autofocus|capture|max|maxlength|min|minlength|required|readonly|pattern|multiple|step)$/i;
Expand Down
Loading