New to this module here. It works very well; the way it operates on an arbitrary CSS entity is excellent.

I've got one suggestion: for the output code, populate the TITLE="" attribute in the HTML. This is useful for people partially dependent on screen readers, and also acts as a helptext on hover in many modern browsers. It's an easy change to make-- I've done it on my end by editing the anchor HTML in text_resize.module. For instance:
<a href="javascript:;" class="changer"id="text_resize_decrease"><sup>-</sup>A</a>
becomes
<a href="javascript:;" class="changer" title="Decrease text size" id="text_resize_decrease"><sup>-</sup>A</a>

Comments

daggar’s picture

Priority: Normal » Minor
matiskay’s picture

That will be great, meanwhile you can override the theme function to accomplish that task.

function YOUR_THEME_NAME_text_resize_block() {
  $output = t('<a href="javascript:;" class="changer" id="text_resize_decrease"><sup>-</sup>A</a> <a href="javascript:;" class="changer" id="text_resize_increase"><sup>+</sup>A</a> <a href="/contact">Contact</a> | <a href="/pages/site-map">Site Map</a><div id="text_resize_clear"></div>');
  return $output;
}

Check the help in admin/help/text_resize

malc_b’s picture

I'd second this. The other way to do "fix" this is to make a custom block and copy the generated block code (i.e. use firebug to find it then copy to a custom block). That doesn't involve writing a function.

attheshow’s picture

Status: Active » Closed (won't fix)

The -A text is already present in the page inside of the <a> tag. I don't see that screen readers would need more description than is given to the regular user.

malc_b’s picture

FYI my use is to provide an informative popup when users mouse over. I say "range -1 to +5" so users know they can make the text 1 smaller and 5 larger.

steveixa’s picture

Issue summary: View changes

Sorry to reopen this old issue but this has come up with a client's project. It would be helpful if there was a tooltip that appeared on hover that says "Increase Text Size" and "Decrease Text Size".

For screen readers I don't think "A+" and "A-" is very meaningful (not that a blind person would need to change the size of the font, but at least it would inform them what the button does). A sighted person has the advantage of the image to the convey purpose of the button. But even then a more descriptive tooltip would be helpful.

It seem like it would be fairly straight forward to implement.

thanks

attheshow’s picture

Feel free to make this type of change on your own site but this will not be happening as part of the module. Sorry.

Tyler the Creator’s picture

Version: 6.x-1.6 » 7.x-1.x-dev
Status: Closed (won't fix) » Needs review
StatusFileSize
new2.63 KB

Having a screen reader say "-A" or "+A" isn't descriptive in the slightest and with testing with VoiceOver on Macs, the superscript isn't even read, so it's just saying "Link: A". The solution stated in the OP with putting the descriptive text in the link's title attribute actually doesn't work with screen readers, so the solution would be to put visibly hidden text in the link along with the original text.

Attached is a patch for the Drupal 7 version of the module that adds descriptive text to each button, as well as removes the HTML from the translate functions so that only the button text gets translated.

andrewmacpherson’s picture

Issue tags: +Accessibility