Accessible name for fieldset is the legend's textContent when the legend is display: none




8 months ago
25 days ago


(Reporter: zcorpan, Unassigned)


(Blocks 2 bugs)

Dependency tree / graph

Firefox Tracking Flags

(firefox63 affected)




8 months ago
From what I understand, display: none (and visibility: hidden) elements should not be included in accessible name.

Test at

Expected "", got "Foo".

In Chrome, the accessible name is "".


8 months ago

Comment 1

8 months ago
Can you cite the section of the spec which supports this? We discussed similar behaviour related to the <label> element in bug 501580 comment 21 and later comments. The relevant spec is Accessible Name and Description Computation 1.1:
As I understand it, the spec tells us what should happen when calculating the name if an element is hidden and is *not* an associated label:

> A. If the current node is hidden and is not directly referenced by aria-labelledby or aria-describedby, nor directly referenced by a native host language text alternative element (e.g. label in HTML) or attribute, return the empty string.

In this case, I think it's fair to say that <legend> is "a native host language text alternative element". So, we must skip this rule. Looking further:

> D. Otherwise, if the current node's native markup provides an attribute (e.g. title) or element (e.g. HTML label) that defines a text alternative, return that alternative in the form of a flat string as defined by the host language, unless the element is marked as presentational (role="presentation" or role="none"). 

It doesn't mention what to do here if the native text alternative element is hidden. It talks about presentational, but that is very explicitly defined as role="presentation"/"none".

I think we definitely need some spec clarification here.


8 months ago
Priority: -- → P3

Comment 2

8 months ago
Spec clarification would certainly be good. Also see
You need to log in before you can comment on or make changes to this bug.