Back to home

Adding information to buttons test

Developers may wish to add additional context to a button for screen reader users.

Option 1: Button title attribute

Test

Code sample

<button title="from Chatswood area">
	Prices
</button>
Support chart
OS Browser NVDA 2014.4 JAWS 16 VoiceOver
Windows 7 IE 11 FAIL - no title PASS
Windows 7 IE 8 FAIL - title only PASS
Windows 7 Chrome 39 PASS PASS
Windows 7 Firefox 34 PASS PASS
OSX 10.9 Chrome 39 FAIL - no title
OSX 10.9 Firefox 34 FAIL - title only
OSX 10.9 Safari 7 FAIL - no title

Option 2: Button aria-label attribute

Test

Example

Code sample

<button aria-label="Download high definition movie">
	Download
</button>
Support chart
OS Browser NVDA 2014.4 JAWS 16 VoiceOver
Windows 7 IE 11 PASS PASS
Windows 7 IE 8 PASS PASS
Windows 7 Chrome 39 PASS PASS
Windows 7 Firefox 34 PASS PASS
OSX 10.9 Chrome 39 PASS
OSX 10.9 Firefox 34 PASS
OSX 10.9 Safari 7 PASS

Option 3: Button aria-labelledby attribute

Test

Example

Code sample

<button aria-labelledby="info3">
	Save
</button>
<p id="info3" class="hidden">
	search queries and return to main menu
</p>
Support chart
OS Browser NVDA 2014.4 JAWS 16 VoiceOver
Windows 7 IE 11 PASS FAIL - labelledby only
Windows 7 IE 8 FAIL - labelledby only FAIL - labelledby only
Windows 7 Chrome 39 FAIL - labelledby only FAIL - labelledby only
Windows 7 Firefox 34 FAIL - labelledby only FAIL - labelledby only
OSX 10.9 Chrome 39 FAIL - labelledby only
OSX 10.9 Firefox 34 FAIL - labelledby only
OSX 10.9 Safari 7 FAIL - labelledby only

Option 4: Button aria-describedby attribute

Test

Example

Code sample

<button aria-describedby="info4">
	Close
</button>
<p id="info4" class="hidden">
	and return to banking details
</p>
Support chart
OS Browser NVDA 2014.4 JAWS 16 VoiceOver
Windows 7 IE 11 PASS FAIL - no describedby
Windows 7 IE 8 PASS FAIL - no describedby
Windows 7 Chrome 39 PASS PASS
Windows 7 Firefox 34 PASS PASS
OSX 10.9 Chrome 39 FAIL - no describedby
OSX 10.9 Firefox 34 FAIL - describedby only
OSX 10.9 Safari 7 FAIL - no describedby

Option 5: Button hidden info

Test

Example

Code sample

<button>
	Check results 
	<span class="hidden">on your business account</span>
</button>
Support chart
OS Browser NVDA 2014.4 JAWS 16 VoiceOver
Windows 7 IE 11 PASS PASS
Windows 7 IE 8 PASS PASS
Windows 7 Chrome 39 PASS PASS
Windows 7 Firefox 34 PASS PASS
OSX 10.9 Chrome 39 PASS
OSX 10.9 Firefox 34 PASS
OSX 10.9 Safari 7 PASS

Bottom of page - Back to home