wai-aria

What is a labelable element?

﹥>﹥吖頭↗ 提交于 2019-12-08 16:18:13
问题 I have been reading on accessibility and a concept I cannot find accurate information on stumbled upon me: HTML labelable elements. I understand that the concept behind a labelable element is one that can be properly wrapped or referenced by a <label> , for example: <label> Enter some data <input type="text"/> </label> Or for example: <label for="anInputField"> Enter some data </label> <input type="text" id="anInputField"/> Does anyone know exactly what labeable HTML elements are and which

Icon Font Accessibility: parent span with aria-label or sibling span with sr-only

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 04:26:38
问题 I have a icon which is not decorative, and it is not directly within an interactive element, though there is an interactive element in the hierarchy. Something like this: <button type="button"> <div> Some info </div> <div> other info </div> <i class="material-icons"> icon </i> </button> This icon displays information about the status of this item. To make it more accessible, is it better to change the structure to this: <button type="button"> <div> Some info </div> <div> other info </div>

WAI-ARIA - selected/current menuitem/page, how to set the correct state in a menubar?

怎甘沉沦 提交于 2019-12-07 06:15:44
问题 I'm doing some code clean up / validation in a web site, and have run into an issue. The site have a main menu (menubar) where the current page should be indicated. The menu structure as is: <nav role="navigation"> <ul role="menubar"> <li role="menuitem" aria-selected="true"> <a href="currentpage">Current page</a> </li> <li role="menuitem"> <a href="anotherpage">Another page</a> </li> </ul> </nav> According to the WAI-ARIA spec, the state aria-selected is not allowed on the role menuitem:

What is the best way to use a background image on a div yet remain accessible?

ε祈祈猫儿з 提交于 2019-12-07 01:10:36
问题 I've built an image gallery that uses div s that contains a background image whose size is set to cover , but I am concerned about accessibility. My questions are as follows: May I use the title attribute on a div in lieu of alt-text attribute on an img tag? Would adding a figcaption element as a sibling to the div , and nesting both in a figure element help accessibility? May I use aria-labeledby on the div ? Should I inject the text into the div as well? Thanks in advance for any insight

Is “aria-haspopup” attribute mainly for toolbar menu?

 ̄綄美尐妖づ 提交于 2019-12-06 10:51:06
问题 I have seen aria-haspopup attribute being used on toolbar menu of applications such as WYSIWYG editor. However, I haven't seen it being used on the main navigation in any ARIA demonstration website. Was this attribute introduced mainly for toolbar menu of applications? Is it appropriate and reasonable to use it on the main navigation (which has submenu) of a website? 回答1: Just saw this attribute being used on the markup of jQuery UI Selectmenu (on the a element, which is the switch of

How do you make the Loading icon accessible for screen-readers like JAWS?

守給你的承諾、 提交于 2019-12-06 07:39:08
问题 So the HTML code is this: <div style="visibility: hidden; display: none; right: 0px;"> <img id="processing" src="PT_LOADING.gif" alt="Processing... please wait" title=""> </div> Even though the ALT text is provided, upon changing the style to show the icon (visibility:visible), it is not read in the time gap when the loading icon appears. role=alert is not a feasible solution since this is not an alert 回答1: You need to add the following attributes to your DIV attributes role="alertdialog"

Actual effect of using WAI ARIA?

拈花ヽ惹草 提交于 2019-12-06 07:31:53
I'm trying to dig into ARIA and make my websites more accessible. I understood using ARIA attributes is a good start but I'd like to understand the actual effects of doing so. If, for instance, I add a role="navigation" on my nav tag used as a menu, what effect will this have for the user? What will its screenreader (or any app helping him) do? Is it really useful to add this if I'm already using a nav tag, which obviously is already telling the user that this is a navigation item? Thanks! The way I understand it is that adding ARIA roles will create a taxonomy of semantics (called landmarks)

Toggle an element's attribute with jQuery?

老子叫甜甜 提交于 2019-12-06 05:35:12
Building a tree menu with jQuery, and I want it to be accessible, so I'm using aria attributes. What I want to do is toggle the "aria-expanded" attribute from true to false on click/enter. I've tried this, but it's obviously not correct: $(this).closest('ul').find('> li.tree-parent').toggleAttr( 'aria-expanded', 'true false' ); You can use .attr() to manually write the toggle logic $(this).closest('ul').find('> li.tree-parent').attr('aria-expanded', function (i, attr) { return attr == 'true' ? 'false' : 'true' }); 来源: https://stackoverflow.com/questions/26772014/toggle-an-elements-attribute

How to group form inputs accessibly without a fieldset?

天涯浪子 提交于 2019-12-06 04:24:23
问题 Problem: Grouping form elements I have an HTML form, where in few places a single control is composed of several inputs. One example is a group of radio buttons. I'd like to group those inputs and it's label explicitly, so that the screen readers would also (in addition to the visual representation by aligning them on a single line) be able to understand and announce this relationship. For example, let's say I have a control like this: <div class="control"> <div class="control-label">Type<

Is the css setting speak:none now equivalent to aria-hidden=“true”?

自作多情 提交于 2019-12-06 01:39:00
问题 I'm just wondering whether I should expect browsers and assistive technilogy circa January 2015 to use speak:none in a manner equivalent to setting aria-hidden="true". I'd like to indicate that some semi-opaque text should be ignored, and am wondering whether I can do it in one operation (just adding a class that sets the opaque style and speak:none, rather than adding the class and setting the aria-hidden attribute). 回答1: There does not seem to be reliable data on support to speak , but it