-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve markup by removing unnecessary elements #32
Conversation
It should probably be a different PR, but I think setting font sizes in px is a trend that should be fixed in this overall rewrite. One of the main reasons to avoid px is accessibility concerns. |
@felixarntz looks good to me except for one thing. Not sure why we need 2 wrappers for each section. |
@felixarntz I 'think' its good. Lets maybe get in and I can do a pass tomorrow on visuals too. Thanks. |
@afercia Being used for styling is a valid reason to keep it IMO. It should be possible to target for example Furthermore, if we wanna get into semantics, let's look at lists for example. There's always a |
@felixarntz on the first point we clearly have a different view :) Not so important for now, however it's not about semantics, it's about clean code and divitis. I think at this stage we shouldn't really be too worried by CSS concerns, that can be addressed later. Anyways, let's move on 😉 About the second point (lists) I'd say no. Forms already have all the semantics users need and users expect they're just... forms. When there's a fieldset, screen readers already announce the number of items in the fieldset. Also, when inside a form, screen readers switch to "forms mode": and tend to read out only the form fields and what is associated to form fields (e.g. an element targeted by aria-describedby) ignoring other elements. |
I'll merge this now as is. I opened #37 to continue discussion whether we should remove |
This PR addresses #22 and #23.
It does the following:
.settings-field-control
span element and instead add this class to every field automatically (input, select, textarea, EVERY element)..settings-sections
div.forms.css
file to the change with the.settings-field-control
class, as it is now for the actual field, not its wrap element.forms.css
file organization by grouping related rules under headings.forms.css
. I considered everything "unnecessary bloat" that was referenced elements on a specific page that don't have anything to do with the Settings API and the new markup. These things were previously in there from being copied from Core's originalforms.css
.16px
font size that other inputs have. While those are labels, they visually belong to the input, so they should have the same style.Of course these CSS changes should not be considered final, but they provide a better base to work from. I didn't adjust any class names here, as that's part of another discussion likely not getting ready before WCEU.
@afercia Can you review the markup changes? This is probably the easy part :)
And @karmatosed, can you do a quick review on the CSS changes? Should be fine, but minor tweaks might be necessary.