GithubHelp home page GithubHelp logo

cehfisher / a11y-style-guide Goto Github PK

View Code? Open in Web Editor NEW
555.0 38.0 61.0 66.44 MB

Accessibility (A11Y) Style Guide

Home Page: http://a11y-style-guide.com/style-guide

License: MIT License

JavaScript 21.12% CSS 4.55% SCSS 44.21% Twig 26.42% HTML 3.70%
accessibility a11y style-guide styleguide twig twig-templates sass a11y-experiment kss-node accessible-pieces

a11y-style-guide's Introduction

A11Y Style Guide

This application is a living style guide or pattern library, generated from KSS documented styles...with an accessibility twist. No matter your level of development or accessibility expertise, there are ways to help contribute to the a11y style guide.

See a live demo of the style guide.

Why did this project start?

We wear a lot of hats as front-end developers. Depending on the client or company you work for, you may be the designer, UX/UI specialist, site-builder, QA tester, and developer all rolled into one. How can we possibly add the accessibility hat on top of all that? What accessible pieces should we even include? Which pieces are easy wins vs. impossible juggernauts? How do we implement inclusive design and development when a project does not have a lot of time or budget to include that piece?

One way we can tackle these issues is by using an accessible component driven approach. By thinking about inclusiveness from the start, we can get a head start on accessibility while still building the required site components.

The A11Y style guide comes with pre-populated accessible components that include helpful links to related tools, articles, and WCAG guidelines to make your site more inclusive. These components also serve as a guide for both HTML markup and SCSS/CSS code, to inform designers, front-end and back-end developers at every stage of the website’s creation.

How do you use this tool?

  • As a reference.
  • As a base for your own style guide.
  • As a base for creating your own accessible components.
  • As a base for a new accessible theme.
  • Contribute to the style guide and make it better.

Really? What can't you do with it is an easier question?

How can you contribute?

Please see the Contributing Guide for more information.

How did you get here?

Maybe you are a total beginner and wondering where to start? That's cool...welcome! Learning accessibility can feel a bit like drinking out of a firehose, so here are some tips to follow on your journey toward accessibility: Getting Started with Website Accessibility or check out the Resources page. For more information on my past articles, conference talks, or to see some accessible SVGs in action, check out my personal website cariefisher.com

Thanks!

a11y-style-guide's People

Contributors

cehfisher avatar dependabot[bot] avatar kendrick avatar kingkool68 avatar klaasvaak avatar martskin avatar mgifford avatar muhnad avatar mxmason avatar omguhh avatar ppozniak avatar scottaohara avatar seasonley avatar shrop avatar widescreenbob avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

a11y-style-guide's Issues

Open in new window indicator

Create open in new window graphic and theme to show users they are going to an external site. Primarily for resources/guidelines section.

Read more link examples - movie quote attributions are hidden from some users.

In the Read More link examples, the movie quote attributions are visually-hidden. Screen readers announce them,

These attributions are probably of interest to everyone, and hiding them from some users is a bad pattern to encourage in the style guide. It's unrelated to the main purpose of the read-more-links section of the guide.

http://a11y-style-guide.com/style-guide/section-general.html#kssref-general-read-more

e.g. The aria-describedby example has "This is a quote from the 1948 movie The Treasure of the Sierra Madre." wrapped in a p.visually-hidden element.

Suggestion: display the attributions visually. Blockquote tags would serve well here.

markdown to html issues

there are still some instances, on the overview page, where the conversion to markdown to HTML is causing some invalid wrapping of elements in <p> tags.

e.g.

<p><h2>How this all got started</h2></p>

I'd assume the fix here would be to instead use markdown to denote the necessary HTML tag?

so do

##How this all got started

rather than

<h2>How this all got started</h2>

but as i'm unfamiliar with the conversion tool, i don't know if that'd actually fix the problem?

Translations to other languages

It would be interesting to translate the guide into other languages, what do you think of the idea? I plan to translate to PT-BR

"visuallyhidden" info in checkbox examples looks confusing

I've had a hard time to understand the purpose of these:

...
<span class="visuallyhidden">The second best Led Zeppelin member is </span>Jimmy Page
...
<span class="visuallyhidden">The third best Led Zeppelin member is </span>John Paul Jones
...
<span class="visuallyhidden">The very best Led Zeppelin member is </span>Robert Plant
...
<span class="visuallyhidden">The forth best Led Zeppelin member is </span>John Bonham

They seem like showing content only to screen-readers to be even more helpful, at least that's what I assume after finding other visuallyhidden elements in other examples as well. Still, the usage in the above examples is not clear to me. Feels like we are providing poll results of some sort?

Create misc resource page

I'm adding resources to the toggle sections on each component, but there are times where the resources do not apply directly to a particular component. need an extra section to link these.

Ranking system

in the SG there are many examples available for each component, to show real-world scenarios we often find ourselves in as developers. however, we do sometimes have full control of the markup/styling so it would be nice to "rank" the examples from in terms of accessibility. i realize this task is difficult for many reasons, but it would be nice to show users of the SG the best options so they can make an informed choice on markup/styling.

duplicate ids

post-shortlink and copy-button appear multiple times across the styleguide.

it'd be best to update any JS using these hooks to instead use classes, and where necessary generate unique IDs for these elements.

Skip nav component

we are using a skip to content button on this site, but need to do a quick write-up of the pieces some one else might need to replicate this.

Add good vs bad screen reader videos with examples

First off, awesome work on this! While browsing through last night, I had an idea to add videos to each of the examples. I was thinking of demoing the different screen readers with good & bad examples to really drive home and connect the "why".

I'm totally willing to do this! But I'm not sure where you would like the videos to be hosted or if you'd be willing to take this change :)

a[role="button"] needs to implement behavior

In the buttons section you recommend to either use a <button> element or to use <a role="button">. What is missing is that if you use the second form, you also need to implement button behavior, namely trigger a click event when pressing the spacebar. See MDN for more information.

Note that the second form goes against the first rule of ARIA:

If you can use a native HTML element or attribute with the semantics and behaviour you require already built in, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so. — Notes on Using ARIA in HTML

In my opinion, the advice should be a bit different:

  • If you need a button, use a <button> element
  • Just because you want a link to look like a button, it does not need to have the role "button".
    • It is nice if your visual semantics (does it look like a button) and ARIA semantics (does it have the role "button") match up, but not too imporant.
  • Remember that <button> defaults to type="submit", so you may want to add type="button" in order to avoid accidentally submitting forms.
  • If something navigates to a different URL, it is a link, not a button.

Create issue template

Per the contributing guidelines you've created a placeholder for, once those are squared away might i suggest the next step would be to create a preformatted issue template?

e.g. creating a .github folder with an issue template markdown file within:
.github > issue_template.md

Add localisation support

Would be awesome to have localisation support to translate the guide to other languages. I would love to translate the guide to Finnish to be used with my co-workers, and I could just fork this repo and do it, but would be pretty great to be able to switch between languages in the guide. :)

read more should use aria-describedby instead of aria-labelledby

Hi, thank you for putting this together.
On the read-more links, you suggest using aria-labelledby to provide unique link text for a read more element. This is not wrong, however the aria-labelledby attribute will replace the text node with the content from the heading. So, instead of hearing "link read more", you would hear "link storms hit east coast". That's not terrible.

Another option is to use aria-describedby. This will not replace the text node, but will add the heading text as additional information. So you would hear "link read more {short pause} Storms hit east coast".

Read more example update/testing

One item to note: Describedby (at least with JAWS/NVDA and Firefox) only gets read when you tab to the element. The describedby text isn't read if you arrow through the text for example 3 (via Rachel Olivero Drupal slack).

Pagination Arrow Updates

Per mention in this commit, the arrows are being read aloud by VO.

likely want to revise these to be SVGs that we can set to aria-hidden, so they will not be read aloud, or update to CSS generated triangles or background images?

Create new teaser card pattern

Noticed missing a teaser image with body text and link pattern that most sites seem to have. Most sites have redundant links, which is a WCAG warning...but also just annoying to users of screen readers.

pattern

Should teach input type=image for graphical buttons

Right now, the only advice for graphical buttons is:

If the button only contains an <img> element, make sure to set its alt attribute. If it only contains an icon use aria-label.

... which is correct if you decide to make a graphical button this way, but buttons should only contain phrasing content (MDN). A quick mention & demo of <input type="image"> might be better advice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.