How I learned to stop worrying and become an Accessibility Expert Engineer

We are doing it live!

3
  1. Accessibility Simulator
  2. What is accessible code?
  3. Development
  4. Helpers
  5. Conclusion
4

Accessibility Simulator

Launch Simulator

Screen Readers

5

What is accessible code?

5 Major Accessibility Categories:

  • Visual (e.g. non-sighted, myopia, color blindness, etc.)
  • Auditory
  • Motor
  • Cognitive
  • Temporarily Disability

Development Focus Areas:

  • Semantics
  • Keyboard inputs
  • Text alternatives
  • Color Contrast

Audit Checks:

  • Websites & Applications
  • HTML Emails
  • Mobile Applications
  • Files
    • Images
    • Video
    • PDF's

Examples

Bad: Shein

Good: H&M

Let's go.

7

List of the most common issues:

  • Background and foreground colors do not have a sufficient contrast ratio.
  • Missing or insufficient alternative text for imagery.
  • Insufficient keyboard navigation functionality.
  • Form element inputs do not have associated labels.
  • Focusable child elements exists inside a hidden ARIA element
  • Modals do not get focused or trapped when displayed on-screen.
  • Buttons do not have accessible names.
  • Child ARIA elements do not contain a specific role required by parent ARIA element.
  • Focusable child elements exists inside a hidden ARIA element.
  • Heading elements are not in sequential order.

As an engineer, while you are designing or developing a product, you should always:

  • Make sure you convey meaning through form, not only color.
  • Make sure your product is resizable.
  • Make sure your content subjects are distinguishable.
  • Make sure you follow the guidelines from the W3C.

All a developer needs to write fully accessible code is already built into the fabric of html.

List of semantic html elements

8

Semantic HTML

Buttons

What's wrong with this code?

Button Label

<div class="button">Button Label</div>

Why is this correct?

<button>Button Label</button>

9

Semantic HTML

Images

What's wrong with this code?

<img src="/images/frog.jpg" />

Why is this correct?

A green frog resting on a palm frond
<img src="/images/frog.jpg" alt="A green frog resting on a palm frond" />
10

Semantic HTML

Landmarks

W3C Guidelines

What's wrong with this code?

<div class="header">
<div class="nav"></div>
</div>
<div class="main">
<div class="announcement"></div>
<div class="offers"></div>
</div>
<div class="footer"></div>

Why is this correct?

<header>
<nav></nav>
</header>
<main>
<section class="announcement"></section>
<section class="offers"></section>
</main>
<footer ></footer>

11

Semantic HTML

Form Labels and Inputs

What's wrong with this code?

Name:

I am a human

<p>Name:
<input type="text" />
</p>
<p>
<input type="checkbox" /> I am a human
</p>

Why is this correct?

<p>
<label for="name">
Name:
</label>
<input id="name" type="text" />
</p>
<p>
<input id="human" type="checkbox" />
<label for="human">
I am a human
</label>
</p>
12

Semantic HTML

Form Labels and Inputs

What's wrong with this code?

Loan Type:

Spaceship
<p>Loan Type:</p>
<input name="loanType" id="loan_car" type="radio" value="Car" /><label for="loan_car">Car</label>
<input name="loanType" id="loan_car" type="radio" value="House" /><label for="loan_house">House</label>
<input name="loanType" id="loan_spaceship" type="radio" value="Spaceship" />
<label for="human" class="loan_spaceship" style="display: none;">
Spaceship
</label>
<span class="custom-label">Spaceship</span>

Why is this correct?

Loan Type: Spaceship
<fieldset>
<legend>Loan Type:</legend>
<input name="loanType_correct" id="loan_car_correct" type="radio" value="Car"/><label for="loan_car_correct">Car</label>
<input name="loanType_correct" id="loan_house_correct" type="radio" value="House"/><label for="loan_house_correct">House</label>
<input name="loanType_correct" id="loan_spaceship_correct" type="radio" value="Spaceship"/>
<label for="loan_spaceship_correct" class="sr-only">Spaceship</label>
<span class="custom-label" onclick="checkRadioButton('loan_spaceship_correct')" style="background: ...">Spaceship</span>
</fieldset>
13

ARIA

List of ARIA Roles

Roles

ARIA roles are predefined designations that provide meaning to content, specifically on elements that are not codified by native HTML or not fully supported by the browser. This assures interactions with the element is consistent. Roles are in place to support, not replace semantic HTML.

Radio Group

Loan Type:



<div role="radiogroup" aria-labelledby="legend_aria_group">
<p is="legend_aria_group">Loan Type:</p>
<span class="fake-radio" role="radio" aria-checked="false" tabindex="0" aria-labelledby="loan_car_aria" data-value="Car"></span><label id="loan_car_aria">Car</label>
<span class="fake-radio" role="radio" aria-checked="false" tabindex="0" aria-labelledby="loan_house_aria" data-value="House"></span><label id="loan_house_aria">House</label>
</div>
14

ARIA

Roles

Here are some of the most commonly used ARIA roles:

  1. role="alert": Used to provide important, usually time-sensitive, information to the user where it's crucial for the user to be notified about it immediately.
  2. role="banner": Represents a container for introductory content or a set of navigational links. Typically used for the header of a page.
  3. role="button": Makes an element behave like a button, typically used on elements that trigger an action when clicked.
  4. role="complementary": Designates a section of the page as complementary to the main content, like a sidebar.
  5. role="contentinfo": Usually used for metadata about the document or application, often placed in the footer.
  6. role="dialog": Indicates a dialog box or other type of window that separates content or interaction from the rest of the application or page.
  7. role="form": Identifies a form element as a container for form-related elements, enhancing form navigation for assistive technologies.
  8. role="heading": Used to define headings in the document, improving document structure understanding.
  9. role="img": Indicates that the element is an image. This can be useful when creating images from non-img elements (like CSS or SVG).
  10. role="link": Used on elements other than the native anchor (<a>) tag to indicate a hyperlink.
  11. role="list": Identifies a list of items. This can be useful for unordered lists (<ul>), ordered lists (<ol>), or simply a group of related items.
  12. role="listitem": Identifies an item within a list.
  13. role="main": Denotes the main content of a document. Helps users to quickly navigate to the primary content area.
  14. role="navigation": Indicates a section of the page intended for navigation, often used for menus or tabs.
  15. role="region": Used to define a section of content that is sufficiently important to be considered a landmark.
  16. role="search": Used to label a section of the page as a search tool.
  17. role="tabpanel": Used within a tab interface to contain the content associated with a tab.

Remember, the correct use of semantic HTML elements often reduces the need for ARIA roles, as many HTML elements have implicit roles that are automatically recognized by assistive technologies. For instance, <nav> implicitly has the navigation role, and <main> implicitly has the main role. Use ARIA roles primarily when semantic HTML does not provide an equivalent.

15

ARIA

Roles

Is this right or wrong?

  • <button role="button">I am a button</button>
    Thumbs Down Icon
  • <img role="img" src="..." alt="" />
    Thumbs Down Icon
  • <svg role="img" alt="" />...</svg>
    Thumbs Up Icon
  • <nav role="navigation">Main Navigation</nav>
    Thumbs Down Icon
  • <div role="heading" aria-level="1" >Main heading of a page</div>
    Thumbs Up Icon
16

ARIA

List of ARIA Attributes

Attributes

ARIA attributes enable modifying an element's states and properties as defined in the accessibility tree.

Labels



<button aria-label="Close">
<svg
aria-hidden="true"
focusable="false"
xmlns="http://www.w3.org/2000/svg">
<path d="m.967 14.217 5.8-5.906-5.765-5.89L3.094.26l5.783 5.888L14.66.26l2.092 2.162-5.766 5.889 5.801 5.906-2.092 2.162-5.818-5.924-5.818 5.924-2.092-2.162Z" />
</svg>
</button>

States



<button aria-expanded="false" aria-controls="widget1">Show Widget</button>
17

Keyboard Navigation

Focusable Elements: Only specific elements can receive focus, which is why it is imperative to use semantic html and not remove focusability via css.

Focus indicator:The focus indicator is a visual aid which indicates which element currently has focus.

TabIndex: The tabindex attribute indicates that its element can be focused, and where it participates in sequential keyboard navigation. Be wary of setting tabindex! Much like ARIA Roles, by choosing to manually set tabindex, means you have to account for ALL tab instances.

Focusable:

  • Link
  • More About Our Services

    We offer a variety of services including web development, digital marketing, and graphic design. Our team of experts ensures top-quality and innovative solutions for your business needs.

Non-focusable:

  • Non-Semantic Button
  1. Anchor Tags <a>): When they have an href attribute.
  2. Input Fields <input>): All form input fields, except those with type="hidden".
  3. Text Area <textarea>): Multi-line text input fields.
  4. Select Elements <select>): Drop-down lists.
  5. Buttons <button>): Including submit and reset buttons.
  6. Iframes <iframe>): Embeds another HTML page within the current page.
  7. Editable Elements ([contenteditable="true"]): Elements made editable by the contenteditable attribute.
  8. Details/Summary Elements <details> / <summary>): For creating collapsible content.
  9. Audio and Video Elements <audio> and <video>): When they have the controls attribute.

Do NOT set outline to 0 in your CSS declarations!

18
I get by with a little help form my friends poster

What can you do today, tomorrow, and days to come?

Sign up to be on the AAT!

Keep accessibility in mind

Be a proponent for improving our process.



Thank you. Any questions?

Carey Estes Senior Design Engineer of Accessibility 662-255-2884 TextDescription automatically generated with medium confidence Email Disclaimer This E-mail contains confidential information belonging to the sender, which may be legally privileged information. This information is intended only for the use of the individual or entity addressed above. If you are not the intended recipient, or an employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution, or the taking of any action in reliance on the contents of the E-mail or attached files is strictly prohibited.