[thelist] PHP & accessibility

Max Schwanekamp lists at neptunewebworks.com
Wed Jun 7 18:38:51 CDT 2006

> From: Bob Meetin
> A friend who designs accessible websites told me that PHP and other 
> scripting languages are a problem with screen readers.  He 
> 'said' that 
> rather interpreting and executing the code, that his screen 
> reader will 
> interpret the code verbatim, unlike html, meaning that <?php 
> echo "hello 
> world"; ?>  would not display hello world as intended. You 
> would see the 
> characters, question mark, etc.   Is this so and if so, is there a 
> workaround with PHP?

Uh, no.  PHP, like ASP/.Net, ColdFusion, etc, generates markup -- that is,
HTML.  Screen readers deal with HTML, they have no interaction at all with
the scripting language.  Either you misunderstood your friend, or s/he is
speaking out of his/her arse.  E.g.

<?php echo '<p>Hello world</p>'; ?>
When sent to the browser would come out as:
<p>Hello world.</p>

Looks like HTML, tastes like HTML. Here's a popular PHP-based site that is
relevant to the discussion:

Max Schwanekamp

More information about the thelist mailing list