default template isn't correct

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
MarcoZ
Registered User
Posts: 8
Joined: Tue Apr 21, 2009 4:36 pm
Location: Hamburg, Germany

Re: default template isn't correct

Post by MarcoZ » Wed Apr 22, 2009 11:49 am

dhn wrote:If you look inside the code the reply and view counts contain a hidden dfn-element that actually says what the number means.

Code: Select all

47 <dfn>Views</dfn>
As long as the screen-reader does not honour the hidden elements (which I think JAWS does unfortunately) you should have no problem using the forum. In the end the optimal thing for a screenreader to say would be something like: "Topic: default template isn't correct, written by whoever on whenever, 17 replies, 192 views, ..."
Unfortunately, it was agreed between screen reader vendors and browser manufacturers a long time ago that visibility styles should be honoured always. In other words, something with style "display: none;" or "visibility: hidden;" will not be rendered by screen readers. I believe this agreement was reached 4 or 5 years ago or so. And since the dfn element is styled with "display: none;", screen readers don't render it, and browsers such as IE or Firefox don't create accessible nodes for it.

A better solution would be a tweak like found on http://www.mozilla.org for the "Skip to main content" link:

Code: Select all

	.skipLink {
		position: absolute;
		left: -999px;
		width: 990px;
	}
This way, screen readers would render the content, but it would still not be visible.

Marco

User avatar
dhn
Former Team Member
Posts: 4999
Joined: Wed Jul 04, 2001 8:10 am
Location: Internet
Name: Dominik Dröscher
Contact:

Re: default template isn't correct

Post by dhn » Wed Apr 22, 2009 12:19 pm

Good point, we should change that. Feel free to submit a bug report referring to this post. I am looking forward to HTML5 and the added flexibility in that area.

MarcoZ
Registered User
Posts: 8
Joined: Tue Apr 21, 2009 4:36 pm
Location: Hamburg, Germany

Re: default template isn't correct

Post by MarcoZ » Wed Apr 22, 2009 1:12 pm

dhn wrote:Good point, we should change that. Feel free to submit a bug report referring to this post. I am looking forward to HTML5 and the added flexibility in that area.
I've added the ticket, and also submitted a patch which I tested on my local phpBB3 installation.

Thanks for your advice and support on this!

MarcoZ
Registered User
Posts: 8
Joined: Tue Apr 21, 2009 4:36 pm
Location: Hamburg, Germany

Re: default template isn't correct

Post by MarcoZ » Thu Apr 23, 2009 9:17 am

I've updated the patch to include one more case where there was info added for accessibility reasons/screen reader support, but also styled with display: none, and that's the "Skip to main content" style link at the top of overall_header.html in the prosilver theme.

MarcoZ
Registered User
Posts: 8
Joined: Tue Apr 21, 2009 4:36 pm
Location: Hamburg, Germany

Re: default template isn't correct

Post by MarcoZ » Sun May 10, 2009 5:24 am

A quick update:

Both phpbb.com and phpbb.de seem to use a dev version that has my patch in it. So instead of

256
384
by

I now hear

256 topics
384 posts
Last post by

Very cool!

Post Reply

Return to “phpBB Discussion”