From 992402e003347e4e06e53a13b0801677b858eb1b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 11 Dec 2019 10:46:04 -0500 Subject: [PATCH 1/1] LP1852782 MARC editable content aria-labels Label fixed fields by their respective labels. Label tags, indicators, subfield codes, and values with generic terms indicating their purpose. Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg --- .../marc-edit/editable-content.component.html | 2 + .../marc-edit/editable-content.component.ts | 3 ++ .../marc-edit/fixed-field.component.html | 5 ++- .../marc-edit/rich-editor.component.html | 44 ++++++++++++------- 4 files changed, 35 insertions(+), 19 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.html index 359128cee8..5dd8c2996c 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.html @@ -5,6 +5,7 @@ spellcheck="false" class="d-inline-block text-dark text-break {{moreClasses}}" [attr.tabindex]="fieldText ? -1 : ''" + [attr.aria-label]="ariaLabel" [egContextMenu]="contextMenuEntries()" (menuItemSelected)="contextMenuChange($event.value)" (keydown)="inputKeyDown($event)" @@ -23,6 +24,7 @@ [maxlength]="maxLength || ''" [disabled]="fieldText" [attr.tabindex]="fieldText ? -1 : ''" + [attr.aria-label]="ariaLabel" [egContextMenu]="contextMenuEntries()" (menuItemSelected)="contextMenuChange($event.value)" (keydown)="inputKeyDown($event)" diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.ts index c4d848dda0..c6c1ebc498 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.ts @@ -36,6 +36,9 @@ export class EditableContentComponent // space-separated list of additional CSS classes to append @Input() moreClasses: string; + // aria-label text. This will not be visible in the UI. + @Input() ariaLabel: string; + get record(): MarcRecord { return this.context.record; } bigText = false; diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.html index e2e8976197..fa11fef526 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/fixed-field.component.html @@ -3,12 +3,13 @@
- + {{fieldLabel}}
-
diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html index cf214424d6..16d164933d 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/rich-editor.component.html @@ -73,12 +73,14 @@
- - +
@@ -86,12 +88,14 @@
- + - +
@@ -100,18 +104,21 @@ *ngFor="let field of dataFields()"> - + - + - + @@ -123,14 +130,17 @@ - - +
-- 2.43.2