Skip to content

Commit

Permalink
fix: Set the aria-label to color value for color input (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
RazvanPRA committed Dec 13, 2023
1 parent 7384f9f commit eab60b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coral-component-colorinput/src/scripts/ColorInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ const ColorInput = Decorator(class extends BaseFormField(BaseComponent(HTMLEleme
this.classList.remove('_coral-ColorInput--swatch');
this._elements.input.removeAttribute('tabindex');
}

this._syncColorPreviewIcon();
}

Expand Down Expand Up @@ -819,6 +819,7 @@ const ColorInput = Decorator(class extends BaseFormField(BaseComponent(HTMLEleme
if (preview) {
preview.classList.toggle('_coral-ColorInput-preview--novalue', isValueEmpty);
}
this._elements.input.setAttribute("aria-label", this._items._container._color._value);
}

/**
Expand Down

0 comments on commit eab60b0

Please sign in to comment.