Opened 2 years ago
Last modified 2 years ago
#17442 new defect (bug)
CSS selector #wpadminbar * overwrites accessibility generic selectors like screen-reader-text
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 3.2 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I just was looking to update one of my plugins for 3.1/3.2 making use of the new admin bar.
My plugin makes use of the .screen-reader-text CSS class but it is overwritten in the admin-bar by #wpadminbar *
Attachments (1)
Change History (3)
comment:2
hakre
— 2 years ago
The only way I found so far was to add !important which is as the last resort here only. That's because of the cascade and the admin bar using the #id selector and I didn't wanted to introduce admin bar selectors into global css files.
As I was looking I've seen other css files next to global containing some .screen-reader-text selectors mainly adding visibility: hidden to them. From what I know this should not be done as screen readers might hide them as well. Just saying so, I think those can be dropped. You find them by searching for the class.
I'm looking for a quick and simple fix to this.