🏷️ a11y: add aria-label to close button and aria-hidden to SVG (#3698)

Fixes #3641

Add accessible name to the close button for added conversations and hide SVG from assistive technology.

* Add `aria-label="Close added conversation"` to the `button` element.
* Add `aria-hidden="true"` to the `svg` element.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/danny-avila/LibreChat/issues/3641?shareId=XXXX-XXXX-XXXX-XXXX).
This commit is contained in:
Marco Beretta 2024-08-20 00:08:29 +02:00 committed by GitHub
parent d4c0f7267a
commit 5de3b8a148
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,6 +43,7 @@ export default function AddedConvo({
<button
className="text-token-text-secondary flex-shrink-0"
type="button"
aria-label="Close added conversation"
onClick={() => setAddedConvo(null)}
>
<svg
@ -52,6 +53,7 @@ export default function AddedConvo({
fill="none"
viewBox="0 0 24 24"
className="icon-lg"
aria-hidden="true"
>
<path
fill="currentColor"