Log in   Register a New Account

Accessify Forum - Discuss Website Accessibility

New to the forum?

Only an email address is required.

Register Here

Already registered? Log In

Currently Online

No registered users are online.

Invisible/hidden form Labels

Reply with quote Two questions...

Are hidden form lables WCAG 2.0 friendly (I'm sure i could figure it out if I had a few hours spare - but if someone knows....)?

What is the 'most accessible' form of hiding?

(My guess is no and positioning off screen, but would like to hear thoughts)

chrs
Phil

creator of Talklets
Talklets ,
Reply with quote It's my understanding that hidden objects are not rendered on the screen, but are not hidden from a screen reader.

I'm not a big fan of work arounds (patches or whatever you want to call them) on principle, however there are realities in life.

Is it just one label you want to hide or all of them?
Reply with quote I favour positioning...
Reply with quote I tend to favour the 'off-screen' hiding of form element labels.

Typically, entering a credit card number, as in



can then rended by an AT reader as:



which is a lot easier if you want to know where you are in the sequence, or when you want to review the entries.

.
Reply with quote Without meaning to detract from your point, Jake: in that particular example, I would argue that it's not really necessary to split up the fields, since you can easily cope with however they format their credit card number on the server. Smile

Point well taken for, say, a date-of-birth though.
Reply with quote
CSS 2.1 wrote:
none
This value causes an element to generate no boxes in the formatting structure (i.e., the element has no effect on layout).

(Source: The 'display' property.)
CSS 2.1 wrote:
For instance, if an element in the document tree has a value of 'none' for the 'display' property, that element will generate nothing in the formatting structure.

(Source: The CSS 2.1 processing model.)
In terms of CSS 2.1, this means an element with display: none is unavailable to ATs since the box doesn't exist.

WCAG 2.0 wrote:
This technique is sufficient for Success Criteria 1.1.1, 1.3.1 and 4.1.2 whether or not the label element is visible. That is, it may be hidden using CSS. However, for Success Criterion 3.3.2, the label element must be visible since it provides assistance to all users who need help understanding the purpose of the field.

(Using label elements to associate text labels with form controls.)
After a few false starts and a bit of a wild goose change, I found that.

Took about 15 minutes to research and write this message.
Reply with quote Many thanks Ben, that last bit was just what I was after, I think.

Not the answer I wanted though. Basically, I want to use IMGs (both of text and illustrative images/icons), rather than the label text itself, for visual cue. So I hope that makes it ok? In practice I think it does.

Again thanks, it would have taken me a LOT longer Smile

creator of Talklets
Talklets ,
Reply with quote Glad to be of use. Cool

Use <img src alt> inside <label for>? That's a visible label, with the labelling text in the alt attribute.
Reply with quote interesting. Not sure AT would know what to do with that though. [Not sure if any would (haven't checked)...]

creator of Talklets
Talklets ,


Last edited by Phil Teare on 14 Jan 2009 02:53 pm; edited 1 time in total
Reply with quote I expect all ATs to support alt text!!
Reply with quote As they do. However, if the AT has found a form element, then gone looking for its label, it might assume the most pertinent value to read would be its innerText / textContent. Not the alt text of an image in the label...

creator of Talklets
Talklets ,
Reply with quote What about using visibility:hidden on a label for the purposes of spacing? I think this probably isn't compliant, but does anyone have any evidence they can link me to? Ta Very Happy
Reply with quote See the survey results from 2003. In short, most screenreaders will not announce content that is hidden with visibility: hidden;. Smile
Reply with quote Thank you for that. Very Happy

Display posts from previous:   

All times are GMT

  • Reply to topic
  • Post new topic