Screen reader only legend tags

Events happening in the community are now at Drupal community events on www.drupal.org.
hefox's picture

There are is a Firefox browser bug where some properties don't work for legend tags (Read about it http://stackoverflow.com/questions/1097369/hide-html-form-legend-using-css that linked to http://marc.baffl.co.uk/bugs.php#legend ).

So, the drupal 7 element-invisible from http://drupal.org/node/473396
with the css defination of
.element-invisible {
height: 0;
overflow: hidden;
position: absolute;
}
does not work. The position element and height 0 take no effect and the element still appears visually.

The only way I've found to hide it is font-size:0 (then strip off any padding, margin), but will that work; ie will the screen readers still read it?

Wasn't sure whether to re-open the drupal 7 issue since it's a firefox bug for that specific tag and I hate re-opening long issues.

Comments

Ok, that's fascinating.

mgifford's picture

Now the Drupal 7's element-invisible does work with everything I've tested it on. Apparently this must not have included legend tags.

Thanks for these links. Is there an instance in Drupal 7 core where legends should be hidden?

element-invisible can always be over-ridden in style.css of a theme, but since this is a browser bug would be better to get the FireFox team to fix it asap.

Have you checked it out in Fangs - http://www.standards-schmandards.com/projects/fangs/

I don't believe there's

hefox's picture

I don't believe there's anywhere in drupal 7 where legend would need to be hidden; also, at least in drupal 6, there's no easy way to give legends a class. In my case, on a drupal 6 site, I first tried element-invisible's definition (instead of trying to stick the class in) with a selector for the legend I wanted hidden.

Anyhow, thanks for pointing me toward fangs; it looks like font size set to zero does work (OE, can find my hidden icon in fang's output), though it still retained margin and padding, but that was the easier to get rid of.

Good to know about this exception

mgifford's picture

And glad that it isn't likely an issue in D7. Thanks for following up.

Accessibility

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week