All Projects → scottaohara → A11y_styled_form_controls

scottaohara / A11y_styled_form_controls

Licence: mit
Various styled accessible form controls

Projects that are alternatives of or similar to A11y styled form controls

accessible-forms
A series of HTML test cases to determine how specific elements are announced in different screen reader / browser combinations.
Stars: ✭ 159 (-52.54%)
Mutual labels:  accessibility, forms, a11y
chaarts
Charts with HTML & CSS
Stars: ✭ 79 (-76.42%)
Mutual labels:  accessibility, a11y
a11ymyths
a11ymyths.com
Stars: ✭ 26 (-92.24%)
Mutual labels:  accessibility, a11y
Checka11y.css
A CSS stylesheet to quickly highlight a11y concerns.
Stars: ✭ 313 (-6.57%)
Mutual labels:  accessibility, a11y
AccessSniff
Automated accessibility testing using HTML_Codesniffer (WCAG and Section508)
Stars: ✭ 84 (-74.93%)
Mutual labels:  accessibility, a11y
van11y-accessible-hide-show-aria
ES2015 accessible hide-show system (collapsible regions), using ARIA
Stars: ✭ 34 (-89.85%)
Mutual labels:  accessibility, a11y
Pa11y Ci
Pa11y CI is a CI-centric accessibility test runner, built using Pa11y
Stars: ✭ 291 (-13.13%)
Mutual labels:  accessibility, a11y
accessibility-cloud
👩🏽‍🦯🦮👩🏻‍🦽👩🏿‍🦼 the platform to exchange physical accessibility data in a standardized, future-proof, easy-to-use way.
Stars: ✭ 37 (-88.96%)
Mutual labels:  accessibility, a11y
Accessibility
A repo to organize the guidelines and best practices for accessibility at 18f.
Stars: ✭ 269 (-19.7%)
Mutual labels:  accessibility, a11y
A11y Courses
Courses offered in web accessibility (and other learning opportunities)
Stars: ✭ 288 (-14.03%)
Mutual labels:  accessibility, a11y
Js Offcanvas
A lightweight, flexible jQuery off-canvas navigation plugin which lets you create fully accessible sidebar or top/bottom sliding (or push) panels with keyboard interactions and ARIA attributes.
Stars: ✭ 272 (-18.81%)
Mutual labels:  accessibility, a11y
bookworm
The Universally Accessible document Reader
Stars: ✭ 50 (-85.07%)
Mutual labels:  accessibility, a11y
DomainAccessibilityAudit
Web application to create domain and subdomain accessibility audits, with violation statistics.
Stars: ✭ 41 (-87.76%)
Mutual labels:  accessibility, a11y
Parvus
An accessible, open-source image lightbox with no dependencies.
Stars: ✭ 248 (-25.97%)
Mutual labels:  accessibility, a11y
enabler
✋ Accessibility analyzer for your frontend.
Stars: ✭ 19 (-94.33%)
Mutual labels:  accessibility, a11y
react-native-aria
A library of React Hooks for React-Native (Android/iOS/web) to provide accessible UI primitives for a design system.
Stars: ✭ 164 (-51.04%)
Mutual labels:  accessibility, a11y
A11yproject.com
The A11Y Project is a community-driven effort to make digital accessibility easier.
Stars: ✭ 3,436 (+925.67%)
Mutual labels:  accessibility, a11y
agnosticui
AgnosticUI is a set of UI primitives that start their lives in clean HTML and CSS. These standards compliant components are then copied to our framework implementations in: React, Vue 3, Angular, and Svelte.
Stars: ✭ 326 (-2.69%)
Mutual labels:  accessibility, a11y
AT-browser-tests
HTML tests for various uses, including HTML5accessibility.com and JAWS tests
Stars: ✭ 74 (-77.91%)
Mutual labels:  accessibility, a11y
Whocanuse
WhoCanUse is a tool that brings attention and understanding to how color contrast can affect different people with visual impairments.
Stars: ✭ 259 (-22.69%)
Mutual labels:  accessibility, a11y

The Accessibility of Styled Form Controls

A repository of styled and "styled" form control elements and markup patterns, and how they are announced by screen readers.

Why?

Form controls are necessary in many interfaces, but are often considered annoying, if not downright difficult, to style. Many of the markup patterns presented here can serve as a baseline for building more attractive form controls without having to exclude users who may rely on assistive technology to get things done.

In some cases, there may be a lack of support, or complications that arise when controls are styled. Those instances will be noted as well.

How to use?

Largely, many of these form controls can be copied and pasted into your pattern library, project, or pattern library project. Each form control has its own CSS file, and only when needed, JavaScript file. Each form control shares the --demo-only--.css and --shared--.css files. These files are largely only needed for presenting on these demo pages, and much of the shared styles are merely ports of a few normalize.css selectors.

Wait, JavaScript?

Yes, while many of these form controls can be styled with some thoughtful maneuvering of markup and CSS, controls such as file uploads, toggle buttons and switches need a bit of JavaScript (and sometime ARIA) to function and correctly convey state.

The Different Form Elements

The following controls and elements each have demo pages with additional documentation pertaining to implementation, UX, and screen reader announcements.

Regarding screen reader announcements...

Note the documentation of screen reader announcements is based on using the indicated versions of each screen reader and browser, as indicated in each test. The test results are as up to date as indicated on each test page. Documentation is noted as "updated" when new testing or techniques have changed. Editorial updates may not constitute a change in the noted updated date.

Things may change as browsers and screen readers are updated, so please refer to these as a snapshot in time, rather than being definitive results.

If you find that announcements and/or support as changed, please file an issue!

Checkboxes and Radio Buttons

Styled HTML checkboxes, and radio button patterns.

Checkboxes can be used as a single form option, or grouped with similar checkboxes. Within a group, one or more checkboxes may be checked by the user. In contrast, radio buttons provide users two or more options to choose from, but only one option may be chosen from a single radio button grouping.

  1. Styled Checkboxes
  2. Styled Radio Buttons
  3. Radio Button Star Rating
  4. Radio Button Pill

Switches & Toggle Buttons

Switches are a type of form control that are often visually represented as an on/off toggle. A toggle button may be styled similarly, or as a button that has a clear difference between the default and active (pressed) state. A toggle button is created when a button has the aria-pressed attribute set to true or false.

Unlike checkboxes, which are largely used in the context of forms where a user submits data after filling out all necessary information, switches and toggle buttons can be used to perform an instant change to a component or application's state. As there is no "switch" in HTML, a checkbox or button element can be progressively enhanced into a switch, with the appropriate ARIA attributes.

  1. Switch Checkbox
  2. ARIA Switch Controls (external repo)
  3. ARIA Toggle Button
  4. Switch Radio Button Group

File Upload

A styled file upload form control that relies on the native HTML input type="file" for providing the appropriate announcements to screen readers.

A file upload allows users to add one, or more, file(s) to submit with a form.

  1. File Upload

Range Slider

A styled input type="range" form control that takes multiple browser's CSS implementations into consideration.

Range sliders allow users to select a point, or a scoped range, from a series of data.

  1. Range Slider

Select Boxes

Styled single and multi-select patterns.

Selects allow a user to pick one or more options from a menu of choices.

  1. Select (single)

Progress Bar & Meter

Progress bars indicate the current status of a particular task, or tasks, on a scale of 0 to completion. A meter acts as a gauge and indicates a value within a finite value set.

The progress and meter elements are considered form elements, but they are not focusable form controls.

Unfortunately, neither of these elements are consistently accessible to screen readers. Styling each can actually make them even more inaccessible...

  1. Progress Bar
  2. Meter

Search Component

A search component offers users an easily discoverable way to find information in a website or application.

  1. Search Component

Contribute?

There are still patterns to make and test, as well as retesting of current patterns to ensure nothing gets stale. File or check out available issues for some of the stuff that needs working on :)

License, Thanks, and such

Everything here is under an MIT license.

While I was unaware of WTFForms when starting this project, it is still a great example of what can be done with only CSS, and served as an excellent baseline to compare against. Thank you mdo and to those involved with that project.

Additional thanks to Eric Bailey, Josh Drumm, James Curd, Adrian Roselli, Sara Soueidan, Heydon Pickering, Richard Keizer, Chris O'Brien and Alexander Farkas. They have each provided inspiration and/or excellent resources that have been quite helpful in the building of these components.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].