No Accessible name for control when label has position:absolute and overflow:hidden

RESOLVED DUPLICATE of bug 501580

Status

()

defect
RESOLVED DUPLICATE of bug 501580
7 years ago
2 years ago

People

(Reporter: hans.hillen, Unassigned)

Tracking

(Blocks 1 bug, {access})

Trunk
x86
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

7 years ago
Posted file hiddenlabelbug.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5

Steps to reproduce:

When a form control's label is hidden off screen, Firefox exposes Null as accessible name for the control. This seems to be occur whenever the label is styled with position:absolute; and overflow:hidden; (even if the label itself is still visible on the screen). If either the position or overflow CSS property is removed, the problem no longer occurs. Only when both position:absolute and overflow:hidden are set.

The attached test case demonstrates this issue (HTML code shown below).

<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title>Test Case for label bug </title>
	<style type="text/css">
		.element-invisible {
			overflow: hidden;
			position: absolute;
			/*left: -999em;
			width: 1em;
			*/
		}
	</style>
</head>

<body>	
	<h1>Test case for label issue</h1>
	<label class="element-invisible" for="sampleTxt1">A hidden label</label>
	<br /><br />
	<input type="text" id="sampleTxt1" />
</body>
</html>		



Expected results:

The label's styles should have no effect on the accessible name of the associated form control (especially since position and overflow are often used to hide content off screen).
Reporter

Updated

7 years ago
Component: Untriaged → Disability Access
OS: Mac OS X → Windows 7
Reporter

Comment 1

7 years ago
It seems that the label is no longer considered an accessible object once the position and overflow style are set.

Updated

7 years ago
Attachment #628303 - Attachment mime type: text/plain → text/html
Blocks: namea11y
Component: Disability Access → Disability Access APIs
Product: Firefox → Core
Version: 12 Branch → Trunk
This is blocking web developers from using sanctioned techniques to apply more context information for screen reader users. Read here:
http://juicystudio.com/article/hidden-label-firefox-bug.php
Alex, can you take a look please?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 501580
Comment hidden (spam)
You need to log in before you can comment on or make changes to this bug.