Skip to content

Search component bug II #1796

Closed
Closed
@claudiac2024

Description

@claudiac2024

Provide a general summary of the issue here

The input element inside the sl-text-field component does NOT have any aria-label, but it cannot be generalized either, so its value should be passed down through the Shadow DOM by an attribute inside sl-text-field component, which is the input element's parent

Image

🤔 Expected Behavior?

Add an attribute (e.g., label) to the sl-text-field component that will act as a proxy for accessibility labels.
This can allow devs to set the accessible name for the input field at the parent level.

Use JavaScript or another framework to observe changes to the label attribute and pass its value to the input element within the Shadow DOM.

😯 Current Behavior

The input element inside the sl-text-field component does NOT have any aria-label, but it cannot be generalized either, so its value should be passed down through the Shadow DOM by an attribute inside sl-text-field component, which is the input element's parent

💁 Possible Solution

Add an attribute (e.g., label) to the sl-text-field component that will act as a proxy for accessibility labels.
This can allow devs to set the accessible name for the input field at the parent level.

Use JavaScript or another framework to observe changes to the label attribute and pass its value to the input element within the Shadow DOM.

🖥️ Steps to Reproduce

linked to the previous bug report on the search component

What browsers are you seeing the problem on? (only for bugs in code)

Chrome

If other, please specify.

No response

What operating system are you using?

iOS

👤 Your name

Claudia

🧢 Your product/team

NPM

🎨 Your Theme(s)

My Digital Book

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions