mckinsey / vizro

Vizro is a toolkit for creating modular data visualization applications.
https://vizro.readthedocs.io/en/stable/
Apache License 2.0
2.49k stars 112 forks source link

Replace all `html.P()` with `html.Label()` in all form components #290

Closed huong-li-nguyen closed 5 months ago

huong-li-nguyen commented 6 months ago

Question

Context why this is beneficial: https://teamtreehouse.com/community/labels-vs-paragraphs#:~:text=The%20tag%20is%20just,in%20the%20CSS.

Code/Examples

Replace html.P(self.title) with html.Label(self.title) for all form components (dropdown, checklist, etc.) and where applicable

Other information

No response

Which package?

vizro

Package version

0.1.9

Python version

3.9

OS

No response

Code of Conduct

huong-li-nguyen commented 6 months ago

@AnnMarieW - is this something you are interested in completing? :) @antonymilne told me you suggested it and I think it's a good idea! Let me know if you are interested in taking this ticket yourself, otherwise would love to get your review on it 👍

antonymilne commented 6 months ago

FYI the advantage is more than just semantic here I think, e.g. you can activate a form field just by clicking the label instead https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label.

AnnMarieW commented 6 months ago

Sure I could do this one :slightly_smiling_face: