Why do we only put the data inside the html tag as in data-number and data-score. What if a user is blind or has js disabled? He will not see the value. Why not add the value inside the div tag

<td class="views-field views-field-field-raty">
            <div class="raty-star field_raty105 raty-star-processed" data-score="5" data-number="5"></div>          </td>

Comments

jwjoshuawalker’s picture

Because it prints out in front of the widgets looking all funky, but we could use css to hide it off-screen.

marcoka’s picture

yep that was what i meant.

jwjoshuawalker’s picture

Title: Why only data-score and no real value » Print value alongside stars for screen readers (fixed in dev)
Status: Active » Fixed

Fixed in -dev
http://drupalcode.org/project/raty.git/commit/af79edf

Uses built-in Drupal class 'element-invisible' that does:

position: absolute !important;
clip: rect(1px 1px 1px 1px);
clip: rect(1px, 1px, 1px, 1px);
overflow: hidden;
height: 1px;

Issue closed with next release.

marcoka’s picture

you are doing some awesome work here. thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.