Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-04-19 09:07:36

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Errors in r3746

Very minor, but there are a few typos in the CSS file as of r3746

Patch here

Last edited by philwareham (2012-04-19 10:04:23)

Offline

#2 2012-04-19 09:56:06

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Errors in r3746

Also, in r3746, the new selects all have the same name attribute and label for attribute of “parent_cat”, which is invalid HTML. You need to have unique for attributes for each and every label tag on a page. The select tags are also missing an id attribute, so the label tag has no reference point – need to add a unique id to each of them, and also use that for the label for attribute.

Last edited by philwareham (2012-04-19 10:02:09)

Offline

#3 2012-04-19 18:52:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: Errors in r3746

Urgh, never code late.

Actually, the for shouldn’t be there at all. It was supposed to just be a label wrapped around content. That solves the ID issue and invalid HTML issue in one swoop. I’ll fix this, thanks for spotting my screwups.

EDIT: incidentally, the reason I never picked it up is that the validator says it passes. Go figure!

Last edited by Bloke (2012-04-19 19:09:51)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#4 2012-04-19 19:21:27

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Errors in r3746

Wouldn’t it be better to keep the for attribute and add unique ids to each select? I’m not a fan of label tags without any context. Accessibility and all that.

Offline

#5 2012-04-19 19:43:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,437
Website GitHub

Re: Errors in r3746

philwareham wrote:

Wouldn’t it be better to keep the for attribute and add unique ids to each select?

Although I haven’t tried it, that might kill off a “feature” of the page: if you choose a parent cat in (say) articles and assign a new cat to it, when you hit save, any parents with identical names in other areas (image, files, links) are automatically chosen. This allows rapid category assignment across types if you want to share category trees: something which I know people do, especially when tying image galleries to articles.

If it makes no difference to that functionality then I suppose the labels could go back in and have unique IDs assigned. I never really considered the accessibility angle as a problem since I figured if you navigate into the ‘articles’ category area your screen reader has already told you which bit you’re in and it might get annoying to spell out over and over which segment you’re in: “parent label for article-parent input… article-parent input… article category create button” (which, I dunno, might be deemed as treating people with disabilities as if they were stupid, when they’re clearly not). Isn’t that what aria roles are for anyway? In the visual domain, we don’t need a constant reminder which column is which because the proximity of the cursor tells me. Isn’t it the same with screen readers? You navigate into an area, it’s announced, and all the while you aren’t told otherwise, the assumption is you’re in the same area until you navigate into another part of the screen and are told about it? I’ve never used a screen reader, so I’m just guessing how it works. Willing to be shown the error of my logic… maybe I should go on a course!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2012-04-19 20:06:27

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Errors in r3746

I’ve always used label tags with reference to associate it with a specific form element. Maybe it doesn’t matter really (labels without for attribute are still valid code) but it’s good practice. Let’s leave as is and see if anyone else has a vocal opinion on it.

Ps. There is a semicolon needed in classic CSS file, line 617, for consistency

Last edited by philwareham (2012-04-19 20:06:50)

Offline

Board footer

Powered by FluxBB