Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-11-01 09:13:20

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 58

Search form accessibility in default theme

Hi,
I’ve been prodded to do audits of sites for accessibility and am using AIM’s WAVE browser extension. I usually leave Textpattern sites with the animated search box from the default theme (as like it). This fails WAVE, which asks for a label.

If I try to add a label (or any similar attribute) all the schmick styling disappears and the generated html is a bit odd – the input is inside a p tag and all the schema stuff vanishes. Is this by intention?

I’ve been redoing the forms semi-manually so I can keep the schmickness and insert this label:
<label class="accessibility visually-hidden" for="search-1">Search</label>

Offline

#2 2020-11-02 01:29:52

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,168
Website

Re: Search form accessibility in default theme

Are you using the default theme as shipped with Textpattern 4.8.1 or newer? A <label /> was added, for the same reason as you mention.

This is the form with the default search input field as used by the Textpattern 4.8.1 default theme.
On line 5 it has a <label />. That should be OK for most accessibility tools, I think. If you find that is is not enough, please report.

(note, when you update Textpattern, the theme in use does not get updated)


Where is that emoji for a solar powered submarine when you need it ?

Offline

#3 2020-11-02 01:46:10

peterj
Member
From: Melbourne, Australia
Registered: 2005-06-02
Posts: 58

Re: Search form accessibility in default theme

Hi Philippe, aha! Yes the theme was ~TXP 4.7.3 which would explain it.
And I figured out the other issue with the attributes by staring more closely at the txp:search_input docs:
“Forms… Default: search_input (if no form template is specified and no other attributes are used)”
Thanks.

Offline

Board footer

Powered by FluxBB