How to totally disable ARIA
How to totally disable ARIA
Wordsmith
Posts: 22Questions: 0Answers: 0
Is there a feature enablement / disablement to turn off ARIA completely in datatables? What would the JS look like? Thanks.
This discussion has been closed.
Replies
Can I ask why you would want to disable it? Have I got something wrong in the implementation?
Allan
What lines of code would I have to remove? I don't want to start hacking away at the plugin only to have broken something I'm unaware of.
Anywhere that DataTables uses `setAttribute` and it sets an ARIA attribute, just remove it. What makes you think that is the problem though?
Allan
[code]o[0][0]==c?(h.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),h.setAttribute("aria-label",f+("asc"==(l[c].asSorting[o[0][2]+1]?l[c].asSorting[o[0][2]+1]:l[c].asSorting[0])?p.sSortAscending:p.sSortDescending))):h.setAttribute("aria-label",f+("asc"==l[c].asSorting[0]?p.sSortAscending:p.sSortDescending)):h.setAttribute("aria-label",f);a.bSorted=!0;i(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?M(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,[/code]
Do I remove the entire line or try and dissect the ARIA parts only? Sometimes it's not obvious what needs to be done to get rid of ARIA.
My reason for thinking ARIA might be the issue is I sought some help on the net and came across davidmeharey.com. He's a coder, like you, works extensively with HTML5 audio, and has knowledge of Apple devices. It was he that gave me the idea that ARIA might be the culprit. I'm just trying to explore any possibility at this point.
I could do the min file, but it would just take away time from trying the audio plug-in test I was hoping to do later on... I'll let you know how I get on with it.
Allan
Would my best bet be to remove setAttribute lines as mentioned above?
Thanks,
Allan
[quote]A message with important, and usually time-sensitive, information. See related alertdialog and status.
Alerts are used to convey messages to alert the user. In the case of audio warnings this is an accessible alternative for a hearing-impaired user. The alert role goes on the node containing the alert message. Alerts are specialized forms of the status role, which will be processed as an atomic live region.[/quote]
(Source: http://www.w3.org/TR/wai-aria/roles#alert)
It is causing JAWS to announce "alert" when going from the search box to the table data.
A more appropriate role MAY be "grid" on the element, but I'm not sure if this is necessary.
Commit: https://github.com/DataTables/DataTables/commit/74a78b2
And relevant line:
https://github.com/DataTables/DataTables/blob/1_10_wip/media/js/jquery.dataTables.js#L2539
Any additional improvements are very warmly welcomed!
I didn't use the `grid` role because of the last three words in the ARIA description for the role:
> A grid is an interactive control which contains cells of tabular data arranged in rows and columns, like a table.
DataTables is not "like a table" - it is a table! DataTables uses correct semantic markup, so there doesn't seem to me to be any benefit of saying that the table is a table.
Allan
Allan