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

Incorrect aria-expanded on language button after language selection #5144

Closed
sculpt0r opened this issue Mar 31, 2022 · 2 comments · Fixed by #5255
Closed

Incorrect aria-expanded on language button after language selection #5144

sculpt0r opened this issue Mar 31, 2022 · 2 comments · Fixed by #5255
Assignees
Labels
accessibility Issue related to accessibility. plugin:language The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@sculpt0r
Copy link
Contributor

Type of report

Bug

Provide detailed reproduction steps (if any)

  1. Open CKE4 with language plugin
  2. Inspect the language toolbar button and find its aria-expanded attribute. At this moment it is set to false
  3. Use the language button and select some language.

Expected result

What is the expected result of the above steps?

The aria-expanded attribute should be set to false since the submenu is folded. Also, screen readers shouldn't read this button at the current state as expanded.

Actual result

What is the actual result of the above steps?

The aria-expanded attribute is set to true. Screen readers read this button as expanded when any language is selected.

Other details

  • Browser: -
  • OS: -
  • CKEditor version: 4.18.0 (reproducible even back to 4.13.0 - so no regression)
  • Installed CKEditor plugins: language
@sculpt0r sculpt0r added type:bug A bug. status:confirmed An issue confirmed by the development team. accessibility Issue related to accessibility. size:S plugin:language The plugin which probably causes the issue. labels Mar 31, 2022
@Comandeer Comandeer self-assigned this Jul 5, 2022
@Comandeer
Copy link
Member

The issue is not as simple as it looks and it's present on every menu button in the toolbar (e.g. "Text color"). It originates from the fact that menu buttons are in the "on" state in two situations:

  1. the menu is open,
  2. the content represents one of the menu options (e.g. the gray text would make the "Text Color" button switch into the "on" state).

At the moment we treat the "on" state as the indication of an open menu →

} else if ( this.hasArrow ) {
// Indicates that menu button is opened (#421).
element.setAttribute( 'aria-expanded', state == CKEDITOR.TRISTATE_ON );
}

We would need to come up with a better way to detect it.

@CKEditorBot
Copy link
Collaborator

Closed in #5255

@CKEditorBot CKEditorBot added this to the 4.19.1 milestone Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Issue related to accessibility. plugin:language The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants