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

[TB] Improved use of HTML #993

Open
Tracked by #927
toni-sharpe opened this issue Aug 12, 2024 · 1 comment
Open
Tracked by #927

[TB] Improved use of HTML #993

toni-sharpe opened this issue Aug 12, 2024 · 1 comment
Labels
help wanted Extra attention is needed theme builder app Theme Builder application

Comments

@toni-sharpe
Copy link

Problem/Concern

A large amount of code found here in the code/src/ui/src uses <div> only. The div tag is a generic layout tag for dividing up page areas. Tags like article and section tags provide the same function in HTML5 but with a bit more meaning (for example, an article can be provided with a header and footer and dividided up into sections).

However, accessibility improving by using good HTML. The full list of improvements is unclear but plenty of different tech. reads web-pages, so the advantages work for accessibility and SEO just to start with.

An example: this code here is all divs but it's much more like an ordered list (<ol><li> ...). MDN explain here that while you can use aria-roles, using the correct HTML is better. Two advantages are that there is less HTML, no aria-role properties are needed, leading to faster loading pages and improiving global accessibility on slower devices; and the devloper accessibility, when debugging, they see a list marked up, not a sea of divs, making it easier for them to find the right code to edit.

Proposed Solution

The solution is that devs should learn and use HTML more fully. If you're writing efficient, accessible front-end code on the web then HTML should be well known and used carefully. MDN is a good place to start.

@aaronreed708 aaronreed708 added the theme builder app Theme Builder application label Aug 13, 2024
@aaronreed708 aaronreed708 added the help wanted Extra attention is needed label Aug 15, 2024
@toni-sharpe
Copy link
Author

Help wanted?

Let MDN do some of that.

My opinion: I highly recommend donating time and/or money to their organisation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed theme builder app Theme Builder application
Projects
Status: High Priority
Development

No branches or pull requests

2 participants