Opened 9 years ago
Closed 8 years ago
#35576 closed defect (bug) (fixed)
Menus the "Select All" link should be hidden in the "quick search" tab
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | has-screenshots good-first-bug has-patch |
Focuses: | ui, accessibility, javascript | Cc: |
Description
In the Menus screen, when users click on the "Search" tab the "Select All" link is still visible and can be activated, but there's nothing to select:
Should probably be hidden when the Quick Search tab is the active one, would probably need a CSS class set on the container.
Additionally, when JavaScript is on, the "Select All" link should have a role="button"
because it behaves like a button, while when JavaScript is off it behaves like a link. It would be as easy as adding the aria-button-if-js
CSS class introduced in [35947]
Attachments (4)
Change History (21)
#4
in reply to:
↑ 3
@
9 years ago
Replying to tywayne:
Additionally, as feedback on the patch itself, I think this could be done much more simply. Shouldn't need to add a new function, but rather toggle a CSS class, or use js with
show()
/hide()
I'd agree it could be done in a simpler way, preferably toggling a CSS class and avoiding show()
/ hide()
#6
@
9 years ago
I agree with @afercia for toggling a css class instead of .show()/.hide()
however I did not find .hide
or any similar class for hiding an element in WordPress admin. We can write a little css for this case but why cannot we add a .hide
class so it can be useful for anyone who does not want to use jQuery .show()/.hide()
#7
@
9 years ago
@sayedwp there's a .hidden
class in wp-admin/css/common.css
but probably you would need some CSS class to set on a parent container.
#8
@
9 years ago
@afercia Thanks, yes you are right .hidden
will not work here, I will upload a new patch.
#11
@
9 years ago
- Owner set to sayedwp
- Status changed from new to assigned
Assigning to mark the good-first-bug as "claimed".
See 35576-3.diff
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by stevenkword. View the logs.
8 years ago
#15
@
8 years ago
- Keywords needs-refresh added
Patch needs a little coding standard/whitespace rework - anybody care to refresh that and/or test some more?
#16
@
8 years ago
- Keywords needs-refresh removed
Refreshed patch and added the aria-button-if-js
CSS class on the "Select All" links. However, in order to properly test, the format of the search results should be fixed in #33742, right now they're returned as links instead of checkboxes and labels:
trunk:
4.6
Applied patch and tested. Partially worked for me, but doesn't handle switching between tabs as shown.
Additionally, as feedback on the patch itself, I think this could be done much more simply. Shouldn't need to add a new function, but rather toggle a CSS class, or use js with
show()
/hide()
in the existingprocessQuickSearchQueryResponse
function, and the check for items and toggle accordingly in theattachTabsPanelListeners
to catch switching between tabs.