@@ -108,12 +108,12 @@ include ../_util-fns
108
108
## Table of contents
109
109
110
110
[Accessible form control labels](#form-control-labels)
111
-
111
+
112
+ [Managing focus](#managing-focus)
113
+
112
114
[Using keyboard shortcuts](#keyboard-shortcuts)
113
115
114
- [Component that knows its own role](#component-roles)
115
-
116
- [Managing focus](#managing-focus)
116
+ [Component should know its own role](#component-roles)
117
117
118
118
.l-sub-section
119
119
:marked
@@ -446,7 +446,68 @@ null, 'a11y-input-wrapper.component.html,a11y-input-wrapper.component.ts, a11y-i
446
446
Angular 2 with the `a11y` implementations of native `HTML` elements.
447
447
448
448
Keep reading for more on `a11y` in Angular 2 or [go back to the table of contents](#toc)
449
+
450
+ .l-main-section
451
+ <a id =" managing-focus" ></a >
452
+ :marked
453
+ ## Managing focus
454
+
455
+ Often when developers think of `a11y`, it is thought of as only being for people with visual disabilities and
456
+ screen readers.
457
+
458
+ While we are indeed doing a lot to ensure that screen readers can properly consume and read our pages, `a11y` is
459
+ about much, much more. Visual disabilites make up only a group of the disabilities that hamper access to the `web`.
460
+ There is a vast group of people out there who find it difficult to use our websites because of `motor disabilities`.
461
+
462
+ We need to spare a thought for those out there who would love to use our shiny new Angular 2 application, but
463
+ simply cannot use a mouse. Here we are also talking about people with limited to no use of their hands. This could be
464
+ for a variety
465
+ of reasons, ranging from those with no hands to those who have lost the use of their hands for a period of time due to injury.
466
+ This vast group of people also rely strongly on the keyboard or other types of assistive technologies for web
467
+ navigation.
468
+
469
+ .l-sub-section
470
+ :marked
471
+ One of the most important aspects of `a11y` is called `keyboard accessibility`. This means that the entire website
472
+ **MUST** be navigable and operable through the keyboard alone.
473
+
474
+ :marked
475
+ So how does `keyboard accessibility` relate to `managing focus`?
476
+
477
+ For a user totally dependent on a screen reader or keyboard, his interaction with our site is solidly built upon
478
+ where the current focus of the application lies.
449
479
480
+ .l-sub-section
481
+ :marked
482
+ Focus can be broken down into `keyboard focus`, which refers to which area of the page will next be impacted by a
483
+ keyboard action and `reading focus`, which refers to where the screen reader will next start reading from. They can
484
+ be the same location but it does not have to be.
485
+
486
+ :marked
487
+ In this section we will be looking primarily at `keyboard focus`.
488
+
489
+ :marked
490
+ ### Outline marks the spot
491
+
492
+ We have all seen it, the blue box that web browsers draw around the next `input` we are about to type into.
493
+ This is done by the `outline` style.
494
+
495
+ It clearly indicates where the current `keyboard focus` of the application lies. And, as it turns out, this is one
496
+ of the non-negotiables of `a11y`. We **HAVE** to visually indicate the current `keyboard focus` when focus lies on
497
+ and interactive `HTML` element or custom component. Someone navigating a website with keyboard input alone cannot do
498
+ so unless it is always clear where the `keyboard focus` lies.
499
+
500
+ Unfortunately the solid blue box has not met with everyone's approval in a world filled with opacities and box-shadows.
501
+ Which has lead to one of the often made unforgivable sins of `a11y`.
502
+
503
+ .callout.is-important
504
+ header Leave the focus outline intact!
505
+ :marked
506
+ Do not under any circumstances remove the focus outline for interactive elements with keyboard focus. Keep it unchanged
507
+ or replace with your own but **NEVER** fully remove this with the style command `outline:0`. You will instantly
508
+ render your site unusable for any sighted user who has to use the keyboard or related assistive technologies.
509
+
510
+
450
511
.l-main-section
451
512
<a id =" keyboard-shortcuts" ></a >
452
513
:marked
@@ -457,13 +518,8 @@ null, 'a11y-input-wrapper.component.html,a11y-input-wrapper.component.ts, a11y-i
457
518
.l-main-section
458
519
<a id =" component-roles" ></a >
459
520
:marked
460
- ## Component that knows its own role
521
+ ## Component should know its own role
461
522
462
523
Content coming soon...
463
524
464
- .l-main-section
465
- <a id =" managing-focus" ></a >
466
- :marked
467
- ## Managing focus
468
525
469
- Content coming soon...
0 commit comments