/admin/reports/analytics is just a collection of images. The descriptive text is part of the image and there aren't even alt tags

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mstef’s picture

The images are generated via Google Charts API. To the best of my knowledge, and since I'm the maintainer of Quant, the module producing these charts, I don't think you can specify ALT tags for the images. Do you think it would be useful if there was an admin option to not use charts, but switch to text-based stats?

ezra-g’s picture

IIRC, Google chart images are generated entirely by query string. What prevents Quant from either adding an alt tag to the image or (less ideal) including additional markup that describes the chart data?

mstef’s picture

chart_render() is used to generate the chart via Google. The entire HTML is returned. I'm not sure how you'd inject an ALT tag. If you're visually impaired and cannot read the chart, I don't know how an ALT tag would be useful, other than saying that the chart is. I'd need to review Chart and Google Charts API to see if ALT tags are an option.

ezra-g’s picture

Looking at chart_render(), looks like we can pass an $attributes array - couldn't we put an alt in there with some amount of data there? http://drupalcode.org/project/chart.git/blob/refs/heads/6.x-1.x:/chart.m...

Or, if this doesn't translate well to text in an alt tag, present an HTML table?

mstef’s picture

I was thinking HTML table with some numeric data. The quant objects are loaded with all of the data, aside from the charts. I suggested creating an admin setting that used text instead of images, then just plotting out some simple tables. Would take some work, but totally doable.

What do you think?

mstef’s picture

Status: Active » Needs review
FileSize
489 bytes

Added the requested functionality to quant: http://drupal.org/commitlog/commit/15326/8598eeed261b657d2239421d7d3a565...

An option to output as tables is now present on the quant admin settings page.

Patch attached to alter make file to use the newer commit of quant in Commons.

mstef’s picture

FileSize
53.31 KB

Screenshot preview of tables:

Devin Carlson’s picture

Version: » 6.x-2.x-dev