Moodle

Explicitly label radio buttons in Survey

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7
  • Fix Version/s: 1.8.4, 1.9, 2.0
  • Component/s: Accessibility, Survey
  • Labels:
    None

Description

Survey: explicitly associate radio buttons with the relevant labels, e.g. 'almost never' etc., using <label> and <for> tags.

Issue Links

Activity

Hide
Yu Zhang added a comment -

Fixed in cvs. Please note that you need to trigger the USER->screenreader flag for this to be active.

Show
Yu Zhang added a comment - Fixed in cvs. Please note that you need to trigger the USER->screenreader flag for this to be active.
Hide
Nick Freear added a comment -

I'm afraid the $USER->screenreader flag (MDL-11348) isn't appropriate here - "accesshide" MAY be more appropriate, http://docs.moodle.org/en/Development:Accessibility_notes#Pattern_2:_accesshide - BUT some other points:

  • In general, <label>s are useful for everyone, not just screen readers.
  • Can we use the new formslib here? eg "1 I prefer that my learning focuses on issues that interest me." could be <legend>, "Almost Never" could be <label> as now.
  • If we stick with tables, table headers should be marked up <th>, with Scope, Summary/Caption etc. (<th> eg. In this online unit... Almost Never ...)


Background:

Skype, Nick: "Hi all. I'm just giving notice that a colleague and myself are completing (very late) a review of the accessibility changes for 1.8 - please expect some of the sub-tasks for MDL-7396 to reopen "

I've found an example of a multi-answer survey in the "Features" course, "Constructivist On-line Learning Environment Survey"
http://moodle.org/mod/survey/view.php?id=2332

Show
Nick Freear added a comment - I'm afraid the $USER->screenreader flag (MDL-11348) isn't appropriate here - "accesshide" MAY be more appropriate, http://docs.moodle.org/en/Development:Accessibility_notes#Pattern_2:_accesshide - BUT some other points:
  • In general, <label>s are useful for everyone, not just screen readers.
  • Can we use the new formslib here? eg "1 I prefer that my learning focuses on issues that interest me." could be <legend>, "Almost Never" could be <label> as now.
  • If we stick with tables, table headers should be marked up <th>, with Scope, Summary/Caption etc. (<th> eg. In this online unit... Almost Never ...)
– Background: Skype, Nick: "Hi all. I'm just giving notice that a colleague and myself are completing (very late) a review of the accessibility changes for 1.8 - please expect some of the sub-tasks for MDL-7396 to reopen " I've found an example of a multi-answer survey in the "Features" course, "Constructivist On-line Learning Environment Survey" http://moodle.org/mod/survey/view.php?id=2332
Hide
Yu Zhang added a comment -

Hi Nick, do you mean we should use accesshide class for all the <lable>s instead of using the screen reader flag here?

Cheers,

Yu

Show
Yu Zhang added a comment - Hi Nick, do you mean we should use accesshide class for all the <lable>s instead of using the screen reader flag here? Cheers, Yu
Hide
Nick Freear added a comment -

That was one possibility, maybe not the best one - but please do NOT jump in yet - I'd like to evaluate if we could use 'formslib' here.
At present, I don't think screen reader users hear the question at all, eg "1 I prefer that my learning focuses on issues that interest me."

Chetz - there's a link above - any ideas?

Show
Nick Freear added a comment - That was one possibility, maybe not the best one - but please do NOT jump in yet - I'd like to evaluate if we could use 'formslib' here. At present, I don't think screen reader users hear the question at all, eg "1 I prefer that my learning focuses on issues that interest me." Chetz - there's a link above - any ideas?
Hide
Nick Freear added a comment -

(Adding link to 1.9 accessibility meta-bug.)

  • I have a patch which Chetz tested using JAWS 8 screenreader
  • Just need to make final fixes, then I will commit.
  • Urgent!
Show
Nick Freear added a comment - (Adding link to 1.9 accessibility meta-bug.)
  • I have a patch which Chetz tested using JAWS 8 screenreader
  • Just need to make final fixes, then I will commit.
  • Urgent!
Hide
Nick Freear added a comment -

The attached patch affects 3 files,

  • mod/survey/lib.php - survey_print_multi, survey_print_single functions.
  • lang/en_utf8/survey.php - 1 new string ['responses']
  • theme/standard/styles_layout.css

It fixes:

  • removes use of USER->screenreader using get_accesshide,
  • <label> increases clickable area for radio buttons,
  • adds headings, adds table headers <th>,
  • adds <label> for survey_print_single function,
  • cleans up linear view by putting response headers ("Almost never") on separate line from "In this online unit...",
  • cleans up style - some text-align:center changed to left.

Tested iwith JAWS 7 screenreader in IE 6, IE 6 and Firefox 2.

Show
Nick Freear added a comment - The attached patch affects 3 files,
  • mod/survey/lib.php - survey_print_multi, survey_print_single functions.
  • lang/en_utf8/survey.php - 1 new string ['responses']
  • theme/standard/styles_layout.css
It fixes:
  • removes use of USER->screenreader using get_accesshide,
  • <label> increases clickable area for radio buttons,
  • adds headings, adds table headers <th>,
  • adds <label> for survey_print_single function,
  • cleans up linear view by putting response headers ("Almost never") on separate line from "In this online unit...",
  • cleans up style - some text-align:center changed to left.
Tested iwith JAWS 7 screenreader in IE 6, IE 6 and Firefox 2.
Hide
Nick Freear added a comment -

Having tested well, I've committed the patch to HEAD, 1.9 and 1.8 branches, tagged merged.
Fixed I think.

Show
Nick Freear added a comment - Having tested well, I've committed the patch to HEAD, 1.9 and 1.8 branches, tagged merged. Fixed I think.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: