From 86c1a71ee71dc6001cb815ba518a6ef5dc0e0187 Mon Sep 17 00:00:00 2001 From: Joshua Muheim Date: Mon, 24 Sep 2018 17:15:29 +0200 Subject: [PATCH] Text changes --- pages/knowledge/aria/README.md | 2 +- pages/knowledge/aria/bad-practices/README.md | 10 +--- pages/knowledge/aria/good-practices/README.md | 17 ------ pages/knowledge/aria/purpose/README.md | 60 +++++++++++-------- 4 files changed, 38 insertions(+), 51 deletions(-) delete mode 100644 pages/knowledge/aria/good-practices/README.md diff --git a/pages/knowledge/aria/README.md b/pages/knowledge/aria/README.md index 6d2b482d..60d58097 100644 --- a/pages/knowledge/aria/README.md +++ b/pages/knowledge/aria/README.md @@ -6,4 +6,4 @@ changed: "2018-05-02" # ARIA - when HTML simply is not enough -**There are indeed situations where standard HTML does not provide functionalities for all the requirements developers may have for implementing modern and interactive websites. For this, the Accessible Rich Internet Applications (ARIA) technical specification was introduced. In this chapter, we introduce how it is purposely used, show its potential and shortcomings as well as alternatives to it.** +**There are indeed situations where standard HTML does not provide functionalities for all the requirements developers may have for implementing modern and interactive websites. For this, the Accessible Rich Internet Applications (ARIA) technical specification was introduced. In this chapter, we introduce how it is purposely used, show its potential as well as its shortcomings (and alternatives, if needed).** diff --git a/pages/knowledge/aria/bad-practices/README.md b/pages/knowledge/aria/bad-practices/README.md index ef3ad902..b93546dc 100644 --- a/pages/knowledge/aria/bad-practices/README.md +++ b/pages/knowledge/aria/bad-practices/README.md @@ -6,9 +6,9 @@ changed: "2018-04-12" # Bad ARIA practices -**There are certain situations where ARIA is a good (and maybe the only) way to go. But if done wrong, usage of ARIA often leads to even worse accessibility. Especially accessibility novices tend to misuse ARIA to optimise smelly code. Here we explain some of the typical dos and do nots.** +**There are certain situations where ARIA is a good (and maybe the only) way to go. But if done wrong, usage of ARIA often leads to even worse accessibility. Especially accessibility novices tend to misuse ARIA to "optimise" smelly code.** -ARIA is often misunderstood as "general repair kit" for accessibility problems. Developers new to accessibility usually think that ARIA that can be used to fix accessibility problems for all sorts of bad HTML code. In general though, throwing some ARIA attributes into the mix of bad semantics does not leverage any problem. Most of the time, the exact opposite is the case. +ARIA is often misunderstood as "general repair kit" for accessibility problems. Developers new to accessibility usually think that ARIA can be used to fix accessibility problems for all sorts of bad HTML code. In general though, throwing some ARIA attributes into the mix of bad semantics does not leverage any problem (most of the time, the exact opposite is the case). ## Fixing broken semantics @@ -150,9 +150,3 @@ So in most cases this holds true: if you face a situation where a screen reader Sometimes, developers try to hide focusable elements (or elements that contain focusable children) from screen readers using `aria-hidden`. This leads to unpredictable behaviour in many screen readers, as the browser still allows to focus such elements using the `Tab` key, but because of `aria-hidden` screen readers will not announce it. If you are really curious and want to learn more about this, skip ahead and read [Hiding elements from screen readers using aria-hidden](/examples/hiding-elements/from-screen-readers). - -The purpose of hiding something from a specific user group leads us to the next misuse of ARIA. Read on. - -## Conclusion: caution with ARIA! - -ARIA is an intriguing approach to make the web a more accessible place. In most situations though, it is neither needed (because there are usually better ways to achieve the same result) nor useful (because browser and screen reader support is still shaky). \ No newline at end of file diff --git a/pages/knowledge/aria/good-practices/README.md b/pages/knowledge/aria/good-practices/README.md deleted file mode 100644 index 54c2f662..00000000 --- a/pages/knowledge/aria/good-practices/README.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -navigation_title: "Good practices" -position: 2 -changed: "2018-05-30" ---- - -# Good ARIA practices - -**There are a few ARIA features that truly fill some gaps HTML does not provide a solution for. Working pretty reliably in modern browsers and screen readers, some techniques can be recommended as safe to use.** - -While ARIA is not needed most of the time when developing accessible websites, it can help in certain situations to make the user experience better for screen readers. - -The ARIA techniques that have proven to be useful and robust will be explained in detail throughout the 4th part of this guide, [Examples of accessibility patterns](/examples), specifically in [Sensible usage of ARIA roles and attributes](/examples/sensible-aria-usage). We are carefully using ARIA here and there to optimise some of our proposed examples; this is especially true for our widgets, which are all made of traditional HTML form controls, spiced up with some JavaScript and ARIA, see [Interactive widgets](/examples/widgets). - -## Conclusion: be careful with ARIA! - -There are only rare situations where HTML is not enough. In those (and only those) situations, using ARIA is advised. In other situations, when the use of a clean and semantically correct HTML structure can provide a solution, usage of ARIA is strongly discouraged. This is due to its non-homogenous support among browsers and screen readers. \ No newline at end of file diff --git a/pages/knowledge/aria/purpose/README.md b/pages/knowledge/aria/purpose/README.md index 28f97d7a..07eaa48c 100644 --- a/pages/knowledge/aria/purpose/README.md +++ b/pages/knowledge/aria/purpose/README.md @@ -10,7 +10,7 @@ changed: "2018-05-14" ## Handling HTML shortcomings -Over the last 10 to 20 years, not much has changed to the way content is laid out and marked up in HTML. But since its early days, many de-facto standard user interface patterns have made their way into the collective awareness of the internet, often generally referred to as widgets or rich internet applications (RIAs). Many of those lack native HTML equivalents, typical examples being tablists, dropdown menus, and autocompletes. +Over the last 10 to 20 years, not much has changed to the way content is laid out and marked up in HTML. But since its early days, many de-facto standard user interface patterns have made their way into the collective awareness of the internet, often generally referred to as widgets or rich internet applications (RIAs). Many of those lack native HTML equivalents - typical examples being tablists, dropdown menus, and autocompletes. ### Fictional tablist example @@ -66,11 +66,11 @@ But simply presenting something visually is not enough for screen readers (if yo ## ARIA to the rescue (?) -To fill this gap, the [Web Accessibility Initiative (WAI)](https://www.w3.org/WAI/) - which belongs to the [World Wide Web Consortium (W3)](https://www.w3.org/) - has introduced the [ARIA](https://www.w3.org/WAI/intro/aria) technical specification. It provides specific HTML attributes (`role` and `aria-*`) that allow adding specific semantical meaning to existing HTML elements: +To fill this gap, the [Web Accessibility Initiative (WAI)](https://www.w3.org/WAI/) - which belongs to the [World Wide Web Consortium (W3)](https://www.w3.org/) - has introduced the technical specification [ARIA](https://www.w3.org/WAI/intro/aria). It provides specific HTML attributes (`role` and `aria-*`) that allow adding specific semantical meaning to existing HTML elements: -- `role` attributes add (or override) a semantical role of an element, for example ``. +- `role` adds (or overrides) a semantical role of an element, for example ``. - `aria-*` attributes provide statuses to the current semantical role, for example ``. - - Those statuses can have specific values, depending on the role of the element. + - Those statuses can have specific values, depending on the role of the element. For example, `aria-pressed` can have the values `true`, `false`, and `mixed`. Many de-facto standard user interface patterns do have an ARIA specification, and so do tablists, see [Accessible Rich Internet Applications (WAI-ARIA) 1.1 - Tablist](https://www.w3.org/TR/wai-aria-1.1/#tablist). @@ -95,57 +95,67 @@ Marked up with ARIA, our tablist example would look something like this: ``` -We will take a closer look at what these attributes do (or better: what they should do) later in this chapter. For the time being, just take the following for granted. - First, `role="tablist"` was added to the list container (containing the tabs). The `
    ` element won't be announced as list now anymore by screen readers, but as something like "tablist" (depending on the screen reader). -Then, `role="presentation"` was added to the list elements of the former list. As the list is not a list anymore, the specific `
  • ` elements must not have specific list semantics anymore. The `presentation` role removes any semantical information: the `
  • ` elements are now treated similar to plain `
    ` elements. It may seem silly to use a semantic container and then remove its semantics. But this is generally a good practice for providing backwards compatibility with legacy screen readers that may not support ARIA. +Then, `role="presentation"` was added to the list elements of the former list. As the list is not a list anymore, the specific `
  • ` elements must not have specific list semantics anymore. The `presentation` role removes any semantical information: the `
  • ` elements are now treated similar to plain `
    ` elements (if you are really curious and want to learn more about this, skip ahead and read [Removing semantics using presentation role](/examples/sensible-aria-usage/presentation/)). It may seem silly to use a semantic container and then remove its semantics. But this is generally a good practice for providing backwards compatibility with legacy screen readers that may not support ARIA. Finally, `role="tab"` was added to each tab element. The `