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

set 'aria-expanded' to dropdwon combobox #11056

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

hcvcastro
Copy link
Member

  • browser: accessibility: set 'aria-expanded' to dropdown button
  • browser: accessibility: set 'aria-expanded' to widget menu button
  • browser: accessibility: fix close dropdown widget menu button
  • browser: accessibility: fix no click, close dropdown button
  • browser: accessibility: set 'aria-popup' to combobox
  • browser: accessibility: set 'aria-expanded' to combobox
  • browser: accessibility: fix no click, close dropdown combobox

@hcvcastro hcvcastro force-pushed the pr/master/9F branch 2 times, most recently from 189dfcd to 836aa22 Compare January 31, 2025 11:32
JSDialog.AddOnClick(control.arrow, clickFunction);
builder.map.on('jsdialog', function (e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This code is duplicated, also best to not put many places for processing the message queue as it might later cause hard to find bugs.

It goes: socket -> JSDialogMessageRouter -> JSDialog component and only the "component" should execute any operations, calling some widget actions if needed.

Possible solution:

  • please put in the widget's root (control.container) function: onDropdownClose
  • Dropdown widget has already information about widget from which it was created (see JSDialog.OpenDropdown(dropdownId, control.container <---)
  • Dropdown when closing, can call the onDropdownClose if exists

https://github.com/CollaboraOnline/online/blob/836aa22dad3d1d64668e213e9749f71b3ffedc14/browser/src/control/jsdialog/Util.Dropdown.js

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting your suggestion, I have traced events when dropdown is closed, which exists JSDialog.CloseDropdown and 'clickfunction' callbacks, I did not want to do invasive changes. Well let's try it.

@@ -316,5 +320,13 @@ JSDialog.combobox = function (parentContainer, data, builder) {
content.value = text;
};

builder.map.on('jsdialog', function (e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is duplication I'm talking about

@@ -145,6 +145,7 @@ L.Control.JSDialog = L.Control.extend({
console.warn('closePopover: no builder');
}
else {
JSDialog.CloseDropdown(id, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure if it is needed, how does the call stack look like for this bug?

Copy link
Member Author

Choose a reason for hiding this comment

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

(anonymous) (Widget.Combobox.js:327)
fire (Events.js:146)
JSDialog.CloseDropdown (Util.Dropdown.js:161)
closePopover (Control.JSDialog.js:148)
close (Control.JSDialog.js:86)
(anonymous) (Control.JSDialog.js:227)

Even I have setup the attributes, the function are unreachable
for desktop app.

Change-Id: Ib9e8fbc4027c1f64f78406d9ffa088c04c64709c
Signed-off-by: Henry Castro <[email protected]>
If it is not clicked in the dropdown container there was
no way to set attribute 'aria-expanded' to false

Change-Id: I3a2f0db7b4516ed0a66b77326ab87c6a66339663
Signed-off-by: Henry Castro <[email protected]>
Change-Id: I782477b61bb2ad5732bc101306bf7a9d4dda4eb4
Signed-off-by: Henry Castro <[email protected]>
Change-Id: I45b4891a3b0bd52994cc264c46efe3241e150a7d
Signed-off-by: Henry Castro <[email protected]>
Change-Id: I5a459164174ac4ba4cab42822772e3fb4a3dd711
Signed-off-by: Henry Castro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To Review
Development

Successfully merging this pull request may close these issues.

2 participants