├── README
├── .gitignore
├── MIT-LICENSE.txt
├── wai-aria-example.html
├── stijl.css
└── index.html
/README:
--------------------------------------------------------------------------------
1 | From:
2 | http://mcdlr.com/
3 |
4 | See it live at:
5 | http://mcdlr.com/wai-aria-cheatsheet/
6 |
7 | What started as a simple WAI-ARIA Landmark Roles Cheatsheet turned out to be a full-blown article about the subject.
8 |
9 | Since I had the different elements of the page done, I figured “Why not fill them with content, then?” and that is what I did.
10 |
11 | Also, it appears that to date there was no other WAI-ARIA Cheatsheet, so this will prove useful to developers. Hope it does!
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## OSX.gitignore
2 |
3 | .DS_Store
4 |
5 | # Thumbnails
6 | ._*
7 |
8 | # Files that might appear on external disk
9 | .Spotlight-V100
10 | .Trashes
11 |
12 |
13 | ## vim.gitignore
14 | .*.sw[a-z]
15 | *.un~
16 | Session.vim
17 |
18 |
19 | ## Archives.gitignore
20 |
21 | # It's better to unpack these files and commit the raw source because
22 | # git has its own built in compression methods.
23 | *.7z
24 | *.jar
25 | *.rar
26 | *.zip
27 | *.gz
28 | *.bzip
29 | *.xz
30 | *.lzma
31 |
32 | #packing-only formats
33 | *.iso
34 | *.tar
35 |
36 | #package management formats
37 | *.dmg
38 | *.xpi
39 | *.gem
40 | *.egg
41 | *.deb
42 | *.rpm
43 |
--------------------------------------------------------------------------------
/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2012 Nicolas Barrera
2 | http://mcdlr.com/
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining
5 | a copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/wai-aria-example.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Title of your document
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
In practice, WAI-ARIA gives us more attributes to assign to elements. There are two kinds of attributes, the role attribute and the aria-.* attributes (“.*” meaning that what follows “aria-” is variable)
The aria-.* attributes and the values they can have gives us information about the state of an element, and are more geared toward Rich Application Development.
81 |
The role attribute and the values it can have gives us information about the purpose of an element in question (is it navigation? Main data? Or tangential content?). Assistive technologies can use this information to jump directly to the main content, immediately detect the main navigation of the document, etc.
82 |
This document focuses on the more common WAI-ARIA Landmark Roles, as you can see displayed in yellow. Also, just because you see them here does not mean that they all should be used, it all depends on the actual content of your page. Some Roles are suitable for more than what is shown here, e.g. complementary is suitable for sidebars and also other kind of contents, for more info on any given Role just click on them.
83 |
Why should I use WAI-ARIA Landmark Roles?
84 |
You will enrich the semantics of your documents and improve accessibility.
85 |
You will also have better “hooks” to target your elements, avoiding excessive use of id or class attributes. WAI-ARIA Role values can not be repeated, but HTML5 elements can (you can have several header or footer elements in a single page), so it is easier to make sure you are targeting your actual document header, instead of affecting every possible header element that may in the future be put on your document
86 |
Can I see some code?
87 |
Yeah, sure! :D here is a basic document skeleton with proper role attributes and values: