Make WordPress Core

Opened 3 years ago

Closed 3 months ago

#17442 closed defect (bug) (worksforme)

CSS selector #wpadminbar * overwrites accessibility generic selectors like screen-reader-text

Reported by: hakre Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: Toolbar Keywords:
Focuses: Cc:


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)

17442.patch (1.0 KB) - added by hakre 3 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 hakre3 years ago

I'm looking for a quick and simple fix to this.

hakre3 years ago


comment:2 hakre3 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.

comment:3 nacin3 months ago

  • Component changed from General to Toolbar
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Is this still an issue? The toolbar now contains such text.

Note: See TracTickets for help on using tickets.