Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Strip the fieldset tags out of admin side
I’m probably going to do this anyway, but wanted to post here first. I’m thinking of removing the <fieldset>
and <legend>
tags on the admin-side pages – e.g. the write page – in favour of simple <div>
tags (or even <section>
tags if that makes more sense after I review it).
A few reasons for this:
- There is currently a nonsensical mixture of form field groups in
<div>
regions (such as ‘Comment options’) and<fieldset>
regions. Neither of those regions have any importance over the other, so they should share a common region type. <div>
tags provide much more flexible options to add WAI-ARIA information which in turn makes the page more accessible to those with impairments. For example screen readers can take advantage ofrole=region
to logically group important sections of the page.<legend>
tags are notoriously tricky to style nicely across different browsers (due to their inconsistent base CSS rules).
Any objections with good reason then let me know.
Offline
Re: Strip the fieldset tags out of admin side
Sounds like a plan…. no objections here
Offline
Re: Strip the fieldset tags out of admin side
philwareham wrote:
No particular objection from me, neither pro nor con. As long as the end result is well structured. However I wanted to nitpick on this:
<div>
tags provide much more flexible options to add WAI-ARIA information which in turn makes the page more accessible to those with impairments. For example screen readers can take advantage ofrole=region
to logically group important sections of the page.
fieldset
/ legend
already have a solid built-in accessibility information, no need upfront to add any WAI-ARIA attributes (those aren’t any of those ‘fancy new html5 thingies’).
However, considering the eclectic mix that are some of the forms in the back-end (bits of div
s here, bits of fieldset
s there, then mix hard), they are probably harder for accessibility tools to map them in the total of the form. (I always have a hard time evaluating those from a screen reader perspective, due to hearing problems.)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Strip the fieldset tags out of admin side
@philw13
Exactly, if fieldsets had been used everywhere consistently it wouldn’t have been a problem – but the mix we have at the moment just doesn’t work for accessibility. I’ll settle on the <div>
tag because it can be used in and out of a form setting, and is easier to style with CSS too.
I’ve not been able to find much info on whether a <fieldset>
is actually treated as a role=region either by default, this document seems to omit it completely. Adding role attributes to fieldset also also results in invalid code.
The use of aria can describe the content anyway, so using non-semantic divs is fine (or I may use <section>
tags in the end – not sure yet).
Offline
Re: Strip the fieldset tags out of admin side
philwareham wrote:
I’ve not been able to find much info on whether a
<fieldset>
is actually treated as a role=region either by default…
This document list it as role="group"
(authored by Seve Faulkner). That matches the description in HTML5 (and 4).
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Strip the fieldset tags out of admin side
Ah ok thanks. This aria stuff has been pretty interesting to learn so far (although its a bit convoluted and not very well documented in places).
Offline
Re: Strip the fieldset tags out of admin side
philwareham wrote:
Ah ok thanks. This aria stuff has been pretty interesting to learn so far (although its a bit convoluted and not very well documented in places).
I find the WAI-ARIA spec very hard to read (more so for non-native english speaker(s)…). They need a decent spec writer who also thinks about authors.
BTW I meant to mention that before: I would go with section
s. Those are implicitly landmarks and [role=region]
. Even nested in sections (e.g. the parent columns on the write tab).
edit: grammar
Last edited by phiw13 (2012-10-24 09:04:15)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Strip the fieldset tags out of admin side
Ok, sounds like a plan. Will use sections.
Offline