Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: label attribute value should be set as text in listbox option #6642

Closed
yinonov opened this issue Feb 15, 2023 · 4 comments
Closed

fix: label attribute value should be set as text in listbox option #6642

yinonov opened this issue Feb 15, 2023 · 4 comments
Labels
area:fast-foundation Pertains to fast-foundation closed:obsolete No longer valid community:good-first-issue Good issues for first time contributors community:request Issues specifically reported by a member of the community. improvement A non-feature-adding improvement

Comments

@yinonov
Copy link
Contributor

yinonov commented Feb 15, 2023

🐛 Bug Report

setting label on option does not reflect to DOM

(notice option 2)

image

according to mdn

Label attribute is text for the label indicating the meaning of the option. If the label attribute isn't defined, its value is that of the element text content.

🤔 Expected Behavior

label should precede html content

(see first option)

image

@yinonov yinonov added the status:triage New Issue - needs triage label Feb 15, 2023
@chrisdholt chrisdholt added status:under-consideration Issue is being reviewed by the team. area:fast-foundation Pertains to fast-foundation labels Feb 15, 2023
@chrisdholt
Copy link
Member

This will be difficult because we would need to override what is being projected into the default slot. I'm not sure how we could/would do that. While it's doable for the native element, I'm not sure we have the same ability to do this with how projection works. I certainly understand the desire to stay close here, but I'm not sure it's reasonably feasible or intuitive for this scenario.

@yinonov
Copy link
Contributor Author

yinonov commented Feb 15, 2023

how about visually hiding the default slot and extract its textContent to populate into the template?
or some manipulation utilizing the slotted directive with filter?

can this go south?

I raised this ask a while back #6409

this is the discord correspondence

@chrisdholt chrisdholt added improvement A non-feature-adding improvement community:good-first-issue Good issues for first time contributors community:request Issues specifically reported by a member of the community. and removed status:triage New Issue - needs triage status:under-consideration Issue is being reviewed by the team. labels Jun 28, 2023
@chrisdholt
Copy link
Member

@yinonov if you want to open a PR against the main branch I think we'd take something here as a contribution. I think you're on the stable release still which we can cherry-pick the change into.

@janechu
Copy link
Collaborator

janechu commented May 29, 2024

Unfortunately @microsoft/fast-foundation is being deprecated, refer to #6955.

@janechu janechu closed this as completed May 29, 2024
@janechu janechu added the closed:obsolete No longer valid label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:fast-foundation Pertains to fast-foundation closed:obsolete No longer valid community:good-first-issue Good issues for first time contributors community:request Issues specifically reported by a member of the community. improvement A non-feature-adding improvement
Projects
None yet
Development

No branches or pull requests

3 participants