From: Stephanie Leary Date: Wed, 31 May 2023 18:33:34 +0000 (+0000) Subject: LP1615714 Sandbox: accessible buttons & links X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fsleary%2Flp1615714-accessible-icon-buttons;p=working%2FEvergreen.git LP1615714 Sandbox: accessible buttons & links Adds several new examples to the Sandbox demonstrating the proper use of ARIA labels and title attributes to create accessible buttons and links, including icons. Also demonstrates four counterexamples, showing why they cause problems for assistive technology users. There is additional commentary in the HTML comments above each button. Signed-off-by: Stephanie Leary --- diff --git a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html index fa1dcd01d7..96d53e2ec9 100644 --- a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html +++ b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html @@ -15,8 +15,88 @@ +
+ + +
+

Accessible Buttons and Icons

+
+
+

Icon only:

+ + +
+ +
+

Icon with text:

+ + +
+ +
+

Icon inline with link text:

+ + + + Edit Settings + +
+ +
+

Icon by itself:

+ + + Error +
+ +
+

Button styled as a link:

+ +
+
+
+
+

Inaccessible examples: what not to do

+
+
+

These buttons cannot be accessed using the keyboard and are announced with the wrong roles:

+ + Mouse users only! + + +
No role!
+
+ +
+

This button is announced as "new underscore releases" (no ARIA label):

+ + +
+ +
+

This button will submit form input on Spacebar or Enter (no type attribute):

+ + +
+
+
+ -
+