PHP and accessibility
Moderator: General Moderators
PHP and accessibility
Hi,
I am after creating a website using PHP. I currently have a site that uses style sheets to address the accessibility issues. I have made it so that users can choose their style sheet and this choice would be recorded in a cookie. When they move around the sight the cookie is read and the pages come up using the style sheet of their choice. This causes problems for the browsers that can’t use style sheets, so can you tell me how I can create a site using PHP that allows the user to select a style and the pages are generated using that style. The choice could be recorded by putting the format after the file name using a ?. So the links would have to add on a ? and the format automatically.
Can you help?
Just to note I do not have access to mySQL, also I don't think I can have script generating and saving stuff, if I can't do it any other way I will have to contact the host to get the writing enabled.
Ashley Horsley
I am after creating a website using PHP. I currently have a site that uses style sheets to address the accessibility issues. I have made it so that users can choose their style sheet and this choice would be recorded in a cookie. When they move around the sight the cookie is read and the pages come up using the style sheet of their choice. This causes problems for the browsers that can’t use style sheets, so can you tell me how I can create a site using PHP that allows the user to select a style and the pages are generated using that style. The choice could be recorded by putting the format after the file name using a ?. So the links would have to add on a ? and the format automatically.
Can you help?
Just to note I do not have access to mySQL, also I don't think I can have script generating and saving stuff, if I can't do it any other way I will have to contact the host to get the writing enabled.
Ashley Horsley
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
this is the larger more theory one: viewtopic.php?t=21887
viewtopic.php?t=29176
searching for "templat* engine" shouldn't be all that hard..
viewtopic.php?t=29176
searching for "templat* engine" shouldn't be all that hard..
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
there's no simple checklist.. I'd suggest using Smarty maybe: http://smarty.php.net
as for changing it for all pages, pass the information via cookies, url, user settings, sessions.. there are many ways..
as for changing it for all pages, pass the information via cookies, url, user settings, sessions.. there are many ways..
- smpdawg
- Forum Contributor
- Posts: 292
- Joined: Thu Jan 27, 2005 3:10 pm
- Location: Houston, TX
- Contact:
I know that. I am trying to find out when this will be a problem for you.
There are some browsers that you will never be able to do anything for - stylesheet or not. So accepting that, how many people will be impacted if browserX is not supported? When do you decide that you cannot do anything for that browser because of fundamental limitations in the browser itself?
So the question remains. What browser are you aware of that doesn't support stylesheets for the purpose of enhancing accessibility? How many people do you feel would be affected?
Given the following browser stats, who do do you feel is affected and to what level?
IE - 89.9%
FireFox - 5.7%
Non-FireFox Mozilla - 2.8%
Safaria 1.2%
Part of finding a solution is knowing the extent of the problem.
There are some browsers that you will never be able to do anything for - stylesheet or not. So accepting that, how many people will be impacted if browserX is not supported? When do you decide that you cannot do anything for that browser because of fundamental limitations in the browser itself?
So the question remains. What browser are you aware of that doesn't support stylesheets for the purpose of enhancing accessibility? How many people do you feel would be affected?
Given the following browser stats, who do do you feel is affected and to what level?
IE - 89.9%
FireFox - 5.7%
Non-FireFox Mozilla - 2.8%
Safaria 1.2%
Part of finding a solution is knowing the extent of the problem.
- smpdawg
- Forum Contributor
- Posts: 292
- Joined: Thu Jan 27, 2005 3:10 pm
- Location: Houston, TX
- Contact:
I agree and it is a good thing to do but in terms of the real world relatively few people would use a browser that would present that particular problem. In all likelihood the people that need accessibility support would have a browser that handles stylesheets properly because they can dramatically improve readability, etc.
The ackward part for you as a web developer is trying to emulate stylesheet behavior in browsers that don't support stylesheets properly. You would have to generate pure HTML for those cases. But then strip the formatting from the HTML and send cleaner pages and CSS to the browsers that support it because there is no point is sending bloated pages to browsers that are actually better equipped to display pages than non-CSS browsers.
And then you have the issue that you can do some things with stylesheets that you cannot do without them. How do you address that?
I am trying to find out if the hassles of supporting an old or severely limited browser is worth the extended amount of time that you would spend attempting to add accessibility features to it.
The ackward part for you as a web developer is trying to emulate stylesheet behavior in browsers that don't support stylesheets properly. You would have to generate pure HTML for those cases. But then strip the formatting from the HTML and send cleaner pages and CSS to the browsers that support it because there is no point is sending bloated pages to browsers that are actually better equipped to display pages than non-CSS browsers.
And then you have the issue that you can do some things with stylesheets that you cannot do without them. How do you address that?
I am trying to find out if the hassles of supporting an old or severely limited browser is worth the extended amount of time that you would spend attempting to add accessibility features to it.
Unfortunately I do need to have accessibility features on the pages and therefore need to serve the pages. I am thinking of using PHP to generate the pages. Yes I agree that it is quite a lot of work, but it has to be done. I will also need to produce text only versions of the pages - how would this be done is PHP
- smpdawg
- Forum Contributor
- Posts: 292
- Joined: Thu Jan 27, 2005 3:10 pm
- Location: Houston, TX
- Contact:
So tell me what you expect to do in order to make it happen? Will you be generating CSS and non-CSS pages? Or are you going to generate pages that have fully formed HTML and also CSS to enhance browsers that support it?
Are you changing an existing site? What does the site do?
I'm not trying to nitpick, this all can make a difference in the implementation.
Are you changing an existing site? What does the site do?
I'm not trying to nitpick, this all can make a difference in the implementation.