The preferred libraries in use in Sakai can be implemented to meet a high standard of accessibility. The block element structures and Accessible Rich Internet Applications (ARIA) roles have to be properly created and labelled.
Important Elements of Modal Dialog:
The AIRA dialog role should be used to mark up any dynamic dialog or window that separates content or UI from the rest of the web application or page.
A title block element should be associated with the modal div should have an ARIA attribute of aria-labelledby="ID"
Keyboard focus must be properly assigned.
Tab order should be contained by the dialog
Upon closing, return focus to the activating element
Best practices for tooltips are less established, but we would suggest
The content of the modal div should be derived from the title attribute of the triggering item
The triggering item should be associated with tooltip modal div should through an ARIA attribute of aria-labelledby="ID"
Tab focus on trigger item should trigger and then shift focus to the tooltip content, this can be done by making sure the activating item is an anchor tag, and targets the id of the modal div, so focus is placed on it.
Give the modal div a tabindex="-1" so that it can’t be accidentally tab’ed into.
Upon closing, return focus to the activating element.
Reference implementations can be found for the following libraries