Need help in using Aria

67 views
Skip to first unread message

Sahana V

unread,
Dec 27, 2016, 11:27:27 AM12/27/16
to Free ARIA Community
I have the following code in my chatbox. I need to make the new incoming messages to be read by screen reader. If I use Aria Live anywhere in this code I am getting an error. Can anyone help me with this?

while($row = $resource->fetch_assoc())
{
echo "<div id='cbox'>";

echo "<div>
<b id='uname'>{$row['Name']} </b> 
<i id='time'>{$row['Logs']} </i> 
<span id='cmsg'>{$row['Message']}</span>

</div>";
}

David Ward

unread,
Dec 28, 2016, 10:26:19 AM12/28/16
to Free ARIA Community
hmm, Well it looks like your using some PHP to generate this page or HTML DOM elements... I use PHP in my Braille Sonar App. But I generally feed that PHP responses into a iframe or grab it via a AJAX request. Not too sure how the AT software will interact witha DOM element that's just shot in there with a ARIA Label especially a LIVE label. But that not with standing if you getting a PHP error, then this is a PHP problem. You've probably got a syntax error somethere a extra quote or double quote or something. if you code does shoot back a line error code then look in the directory that has the .php file your running and there should be a log file of errors; an it will likely give you a PHP line number and more explicit error code. You might want to think about AJAX for pulling this content as well. But I'm a PHP novice so maybe you know something I don't. AJAX would give you a lot of versatility and for some of your ARIA labels you'll need Javascript to turn them on and off anyway. Hope that helps. -David
Reply all
Reply to author
Forward
0 new messages