问题
I'm using aria-described by on a few radio buttons so that screen readers will first read the radio label and then the description text to give more information.
Due to the structure of the page I can't use a fieldset. Many source accessibility validators will show an error if you have a label without a for attribute so I am using a div for the description text.
<div id="desc">Choose a fruit</div>
...
<label><input type="radio" aria-describedby="desc" />Apple</label>
<label><input type="radio" aria-describedby="desc" />Orange</label>
However Windows 8.1 Narrator against IE11 will not read the description text.
If I add role="heading" to the div it will (Is this appropriate?). If I change the div to a label it will as well (but fail validation).
The JavaScript WinRT app guidelines seem to indicate that this plain structure is valid (http://msdn.microsoft.com/en-au/library/windows/apps/hh700323.aspx). Does Narrator against IE follow different rules? What are they?
回答1:
Windows Narrator is not a real screen reader, it is a toy! Use the free NVDA screen reader instead http://www.nvaccess.org/. The code you posted is compliant and should work with a proper screen reader such as NVDA.
As evidence for this, look at what is actually being used by the screen reader community
http://webaim.org/projects/screenreadersurvey5/#primary
回答2:
I ran NVDA over some similiar HTML with ARIA attributes and get nothing, same for Narrator. Not sure how a screen reader would read an HTML page anyways. It seems to me, there has to be some integration into the browser for the tags to work. NVDA does read the links .
来源:https://stackoverflow.com/questions/27028855/windows-narrator-and-aria-describedby