question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get along with the WAI-ARIA specification

See original GitHub issue

Wouldn’t it be perfect to make list.js accessible according to W3C’s specifications http://www.w3.org/TR/wai-aria/ All the cool kids talk about it.

It’s not really complicated, you have to:

  • highlight relations between elements when the DOM tree doesn’t do it naturally.
  • tell the user when an element is changed dynamically.

// role="application" http://www.w3.org/TR/wai-aria/roles#application
<div id="lovely-things-list" role="application">

    // you must include a <label> to tell what the <input> is about
    <label for="search-list" >Search lovely things</label>

    // aria-required="false", we tell users they don't need to fill the input
    <input class="search" role="search" id="search-list" aria-describedby="searched-list" placeholder="Search lovely things" aria-required="false" />

    // the script behaves as a tab widget where each tab triggers a panel with a different content http://www.w3.org/TR/wai-aria/roles#tablist
    <ul class="sortby" role="tablist">
        <li class="sort btn" role="tab" id="sortby-name" data-sort="name" aria-describedby="sortedby-name">Sort by name</li>
        <li class="sort btn" role="tab" id="sortby-category" data-sort="category" aria-describedby="sortedby-category">Sort by category</li>
    </ul>

    <ul class="filterby"  role="tablist">
        <li class="btn" role="tab" id="filterby-none" aria-describedby="filteredby-none">Show all</li>
        <li class="btn" role="tab" id="filterby-games" aria-describedby="filteredby-games">Only show games</li>
        <li class="btn" role="tab" id="filterby-beverages" aria-describedby="filteredby-beverages">Only show beverages</li>
    </ul>

    // you'll note first the relation between aria-labelledby="#id_of_the_tab" and aria-describedby="#id_of_the_panel" http://www.w3.org/TR/wai-aria/states_and_properties#aria-labelledby
    // aria-live="off" defines a live region wich will be updated. Once the update has occured, it must be set as "assertive" http://www.w3.org/TR/wai-aria/states_and_properties#aria-live
    // aria-atomic="true" http://www.w3.org/TR/wai-aria/states_and_properties#aria-atomic
    // aria-relevant="all" http://www.w3.org/TR/wai-aria/states_and_properties#aria-relevant
    <ul class="list" role="tabpanel" id="filteredby-none" aria-labelledby="filterby-none" aria-live="off" aria-atomic="true" aria-relevant="all">
        <li>
            <img src="images/monkeyisland.jpg" class="thumb" />
            <h4><span class="name">Monkey Island 2: LeChuck's Revenge</span> <span class="category">Game</span></h4>
            <p class="description">Monkey Island 2: LeChuck's Revenge is an adventure game developed and published by LucasArts in 1991. It was the second game of the Monkey Island series, following The Secret...</p>
        </li>
        <li>
            <img src="images/coffee.jpg" class="thumb" />
            <h4><span class="name">Good Coffee</span> <span class="category">Beverage</span></h4></h4>
            <p class="description">Coffee is a brewed beverage with a dark, slightly acidic flavor prepared from the roasted seeds of the coffee plant, colloquially called coffee beans.</p>
        </li>
        <li>
            <img src="images/fullthrottle.jpg" class="thumb" />
            <h4><span class="name">Full Throttle</span> <span class="category">Game</span></h4></h4>
            <p class="description">Full Throttle is a computer adventure game developed and published by LucasArts. It was designed by Tim Schafer, who would later go on to design the critically acclaimed titles Grim Fandango, Psychonauts and Brütal Legend.</p>
        </li>
        <li>
            <img src="images/brooklyn.jpg" class="thumb" />
            <h4><span class="name">Brooklyn Lager</span> <span class="category">Beverage</span></h4>
            <p class="description">Brooklyn Brewery was started in 1987 by former Associated Press correspondent Steve Hindy and former Chemical Bank lending officer Tom Potter.</p>
        </li>
    </ul>

</div>

I think that’s it, I’ll update if I come by anything more. We can move the discussion on Twitter if you want any more help.

Will you consider this issue ?

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
SpacemanPetecommented, Jul 27, 2016

Just checking in to see if there is any progress made on this issue. I’m thinking of using the pagination in a project but it has to include accessibility features like aria labels. Is there a pre-release ranch that I might be able to help out on?

0reactions
jesconstantinecommented, Oct 6, 2015

Any movement on this issue? Or does anyone have a fork with the added aria language?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accessible Rich Internet Applications (WAI-ARIA) 1.2 - W3C
Roles defined by this specification are designed to support the roles used by platform accessibility APIs . Declaration of these roles on ......
Read more >
WAI-ARIA basics - Learn web development | MDN
As web apps started to get more complex and dynamic, a new set of accessibility ... There are a lot of features in...
Read more >
A Comprehensive Guide to WAI-ARIA - Siteimprove
WAI-ARIA refers to the Web Accessibility Initiative – Accessible Rich Internet Applications. WAI-ARIA is a technical specification written by the World Wide Web ......
Read more >
ARIA Spec for the Uninitiated: Part 1 - Deque Systems
Accessible Rich Internet Applications (ARIA) is a set of attributes that define ways to make web content and web applications (especially those ...
Read more >
WAI-ARIA 1.1 - University of Melbourne
WAI-ARIA 1.1. Additions and Changes. On 14 December 2017, the W3C released an update to its specification for Accessible Rich Internet Applications ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found