Opened 4 years ago
Closed 4 years ago
#9783 closed defect (bug) (fixed)
.invisible class doesn't work as expected in some browsers (such as camino, which is FF based)
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 2.8 |
| Component: | UI | Version: | 2.8 |
| Severity: | major | Keywords: | has-patch tested commit dev-feedback |
| Cc: |
Description
see attached screenshot.
Attachments (6)
Change History (35)
Denis-de-Bernardy — 4 years ago
- Priority changed from normal to high
Denis-de-Bernardy — 4 years ago
- Keywords has-patch dev-feedback added
scanning through the code base, it only affects legends with a class of invisible.
- Component changed from Accessibility to UI
- Keywords tested commit added
third patch is probably the one to use
A lot of accessibility checkers require fieldsets to have legends.
comment:8
in reply to:
↑ 7
Denis-de-Bernardy — 4 years ago
Replying to ryan:
Seeing this with FF 3.5b4 as well.
I'm not surprised, since Camino uses the same engine...
comment:9
in reply to:
↑ 5
Denis-de-Bernardy — 4 years ago
Replying to ryan:
A lot of accessibility checkers require fieldsets to have legends.
are the fieldsets truly needed in the first place? because as things currently are, it's *really* ugly. :-)
comment:10
ryan — 4 years ago
Added some comments to #9445 since several people are following that ticket.
tried height/width/overflow, but I'm afraid it doesn't fix legends...
comment:12
ryan — 4 years ago
All recommendations I've seen are to use a span inside the legend and hide that. Just asked on twitter and got the same.
k, will give it a shot right away.
doesn't work either... :-(
comment:15
ryan — 4 years ago
Worked for me in FF 3.5b4.
this worked on my end:
* legend.invisible span {
position: absolute;
left: -1000em;
height: 1px;
width: 1px;
overflow: hidden;
}
patch coming right up.
comment:17
ryan — 4 years ago
Well, I put the invisible on the span.
<legend><span class="invisible"><?php _e('Admin Color Scheme')?></span></legend>
there you go.
just re-uploaded it, I had left some cruft.
comment:20
filosofo — 4 years ago
For the .invisible hack, don't you mean to use
display:block; overflow:hidden; text-indent:-1000em;
rather than left-positioning?
comment:21
follow-up:
↓ 23
ryan — 4 years ago
We want to hide visually without hiding from screen readers. overflow:hidden will hide from screen readers.
comment:22
ryan — 4 years ago
Heh, looks like we both patched, although I did the invisible on the span. Don't know if one way is better than another.
comment:23
in reply to:
↑ 21
ryan — 4 years ago
Replying to ryan:
We want to hide visually without hiding from screen readers. overflow:hidden will hide from screen readers.
Oops, misread that overflow as display. We're using one of the recommendations made here:
http://webaim.org/forums/viewtopic.php?id=356
There seem to be a dozen different recommended ways.
the invisible is probably better on the legend, you never know if one browser shows up and decides to format that thing in such a way that (since it has content) it ends up generating a big line.
comment:25
filosofo — 4 years ago
While I'm here, any chance we could rename "invisible" to something more semantic, like "screen-reader-text" or the like?
comment:26
ryan — 4 years ago
Drupal calls it "offscreen".
comment:27
filosofo — 4 years ago
Still more style than function. :)
comment:28
ryan — 4 years ago
Indeed. No objection to screen-reader-text or the like.
comment:29
ryan — 4 years ago
- Resolution set to fixed
- Status changed from new to closed

Tried offsetting the margins, using relative positioning with gargantuan margins, !important attribute to css, nothing short of display: none will work.
Camino is a popular browser among Mac users. It's based on Mozilla, but faster due to it using native code.