gjbarnard / moodle-format_topcoll

Collapsed Topics course format for Moodle.
http://docs.moodle.org/en/Collapsed_Topics_course_format
GNU General Public License v3.0
35 stars 60 forks source link

Accordion/Collapsed Topic aria attributes improvements #62

Closed yao9394 closed 5 years ago

yao9394 commented 5 years ago

Hi Gareth,

One of our clients has conducted an accessibility audit for their site. Below is one of the suggestions.

Description Headings have been marked up with button roles using aria properties, however the state conveyed using the aria-pressed property is not indicative of an accordion component.

Implications Screen reader users may not understand the functionality of the component.

Recommendation Ensure accordion/expand and collapse components the aria-expanded attribute to convey their state.

<div class="sectionhead toggle toggle-point" id="toggle-2">
<span class="the_toggle tc-small toggle_open" role="button" aria-expanded="true" tabindex="0"
id="yui_3_17_2_1_1546829310401_87">
<h2 class="sectionname" id="yui_3_17_2_1_1546829310401_86">
Topic 2: This is a very long topic title, which sometimes happens
</h2>
<div class="section_availability"></div>
</span>
</div>

The attribute should be set to true when the panel is open and false when closed. Additionally, ensure the event which is triggered, is fired in the "onclick" event, to allow both keyboard and screen reader users a method to activate the control.

Will submit pull requests later.

Thank you John Y

yao9394 commented 5 years ago

Hi Gareth,

Pull requests submitted. Thank you for your time.

64 #63

Thank you

John Y

gjb2048 commented 5 years ago

Hi John Y,

Sorry for the delay, had no proper broadband for eight calendar days. Hopefully up and working and will stay that way! Will look as soon as I can.

G

yao9394 commented 5 years ago

Hi Gareth,

Sorry to hear that you had no proper broadband for so long, yea, for a developer it is even longer.

Hopefully you can get your Internet back soon.

Thank you for your time.

John Y

gjb2048 commented 5 years ago

Hi John,

Was a nightmare! Hopefully all back now.

G

gjb2048 commented 5 years ago

64 and #63 approved, just need to update Changes.md file.

yao9394 commented 5 years ago

Hi Gareth,

Thank you very much for approving the merge requests.

Cheers

John Y