Forum update/Accessible layout

Jump to: navigation, search

Accessibly forum layout (MDL-41773)

Issue description

Forums have been highlighted as an area of concern with regards to Accessibility, with some groups avoiding lawsuits by migrating to use of mod_hsuforum (developed by Moodle Rooms).

Lack of ARIA attributes and landmarking on relevant content

We currently do not make appropriate use of ARIA roles, states, and other values, including:

  • aria-region
  • aria-labelledby
  • aria-describedby
  • aria-live
  • correct use of the `role`, and `title` tags.

Poor source order for element navigation

The current implementation does not have a logical ordering of content. As a result, when a user visits a forum at the moment they can move to different parts of the content but the ordering will be such that they are given the author, title, author, published date, list of attachments, message, and finally commands.

To allow a tab order on the current implementation, tabindex attributes would need to be specified in order to make things work nicely for someone using a keyboard to navigate the forums. With a reasonable source order of elements, this could be done naturally without forcing the tab index on all elements.

Difficulty in navigating between forum discussions

The current implementation of the forum requires that the user make use of the browser `back` button to return to the thread list in order to select the next thread.

Tasks

Add appropriate ARIA attributes, landmarks, and related tags

The correct ARIA attributes, and landmarks need to be added to the forum markup. Certain markup components should only be added once the content is appropriately ordered. This makes the re-ordering of content a sensible blocker to this task.

Reorder content

The content should be re-ordered into a logical order which would make sense to a user accessing using the keyboard. In order to do this, it is advisable to migrate the existing content to use renderer and renderable items to make it easier to make subsequent changes in structure. A decision also needs to be taken on the most appropriate ordering of content, but the order used by mod_hsuforum, which has had positive feedback so far is:

  • Whole post (div with tabindex=”0”)
  • Discussion author
  • Discussion date (not in tab index)
  • Discussion subject
  • Discussion content/message
  • Reply link
  • Subscribe link
  • Bookmark link
  • Mark as substantive link
  • Options Menu
  • Replies
    • Reply n
    • Author
    • Subject (not in tab order)
    • Content (not in tab order)
    • Date
    • Reply link
    • Subscribe link
    • Bookmark link
    • Mark as substantive link
    • Options Menu
  • Reply authoring
    • Subject field
    • Content
    • File selector
    • Private reply checkbox
    • Submit button
    • Use Advanced editor link
  • Previous discussion link
  • Close discussion link (return to thread list)
  • Next discussion link

Migrate to use of Renderers

The forum uses pseudo-renderers which will need to be converted, first into renderable objects, and then their associated renderers. Although there exist a number of pseudo-renderers (for example, forum_print_post, forum_print_overview), the way in which they are used means that they often call other such functions in different contexts which will make the conversion to use of the Moodle 2 Output API non-trivial. Additionally, this task is difficult to split into smaller components because of the way in which each of the existing print functions call another.

The proposed list of renderable objects includes:

  • mod_forum\post

The proposed list of renderers includes:

  • A forum post
  • The subject area
  • The date area
  • The author area
  • The user picture (existing renderable/renderer)
  • The message area
  • Links
  • Options menu (using actionmenu)
  • Forum navigation links

Improve forum navigation (MDL-8501)

In order to improve navigation between different discussions in the forum, and with the threadlist itself, basic navigational tools need to be added. These include: previous and next discussion links; and a link back to the main thread list.