[thelist] PHP & accessibility

Andrew Kamm akamm at demicooper.com
Wed Jun 7 18:20:32 CDT 2006

> Confirm or deny?
> 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?
> -Bob

Deny. PHP is read/parsed by the server which outputs whatever you tell it to
(usually HTML). It will not output any PHP to a screen reader. The 'echo
hello world' example you gave would simply say "hello world."

Any server side language (PHP, ASP, ColdFusion, etc) will not be seen by a
screen reader.

He's probably thinking of JavaScript, but I'm guessing by now most screen
readers would simply ignore JavaScript or render it as HTML (as in a
document.write() statement that is outputting text/HTML.

I would avoid JavaScript if I were specifically going after accessibility,
but I don't know the details of how current screen reading software renders

Andrew Kamm

More information about the thelist mailing list