-
Notifications
You must be signed in to change notification settings - Fork 764
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
base: master
Are you sure you want to change the base?
Changes from all commits
56d6e19
f6b832d
ce87cdd
5b05e94
a988854
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,9 @@ JSDialog.OpenDropdown = function (id, popupParent, entries, innerCallback, popup | |
] | ||
}; | ||
|
||
this.popupParent = popupParent; | ||
this.popupParent.setAttribute('aria-expanded', true); | ||
|
||
var isChecked = function (unoCommand) { | ||
var items = L.Map.THIS['stateChangeHandler']; | ||
var val = items.getItemValue(unoCommand); | ||
|
@@ -158,6 +161,11 @@ JSDialog.OpenDropdown = function (id, popupParent, entries, innerCallback, popup | |
}; | ||
|
||
JSDialog.CloseDropdown = function (id) { | ||
if (this.popupParent) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please avoid globals, we have menus with submenus :) we need to save it inside instance There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cascade popups?. Let me see what can I do |
||
this.popupParent.setAttribute('aria-expanded', false); | ||
this.popupParent = null; | ||
} | ||
|
||
L.Map.THIS.fire('jsdialog', {data: { | ||
id: _createDropdownId(id), | ||
jsontype: 'dialog', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -157,5 +157,7 @@ if (activateValidation) { | |
window.app.file = new Proxy(window.app.file, validator); | ||
} | ||
|
||
window.JSDialog = {}; // initialize jsdialog module | ||
window.JSDialog = { | ||
popupParent : null, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to avoid globals, just keep it in the instance |
||
}; // initialize jsdialog module | ||
window.SlideShow = {}; // initialize slideshow module |
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.
it calls:
L.Map.THIS.fire('jsdialog'
which probably will land here again.easy to do a cycle, does it work? do we have cypress test for closing popup using that?
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.
No, I do not have evidence failing unit test