Skip to content

Commit

Permalink
fix(Accessibility): Annotation swatch selector button missing an acce…
Browse files Browse the repository at this point in the history
…ssible name (#341)
  • Loading branch information
mariang-ens committed Apr 23, 2024
1 parent 5b3f533 commit a5a4c93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions coral-component-colorinput/src/scripts/ColorInput.js
Expand Up @@ -687,6 +687,9 @@ const ColorInput = Decorator(class extends BaseFormField(BaseComponent(HTMLEleme
if (this.showProperties === showProperties.OFF &&
this.showSwatches === showSwatches.ON) {
this._elements.colorPreview.label.textContent = i18n.get('Swatches');
if (this.previousSibling) {
this.previousSibling.setAttribute('aria-label', i18n.get('Confirm hex value'));
}
this._elements.overlay.setAttribute('aria-label', i18n.get('Swatches'));
} else {
this._elements.colorPreview.label.textContent = i18n.get('Color Picker');
Expand Down

0 comments on commit a5a4c93

Please sign in to comment.