Changeset 14238

Show
Ignore:
Timestamp:
07/03/08 06:52:36 (5 months ago)
Author:
becky
Message:

fixes #6605, #7092. Update the template and code to set the ARIA selected state to true on current tab, false on others. Added ARIA presentation roles on layout divs - this fixes the numbering problem of 7092. Also, use ARIA labelledby property to assign the title so that the +- which are used for high contrast are not spoken by the screen reader.

Location:
dijit/trunk/layout
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/layout/AccordionContainer.js

    r13897 r14238  
    184184                dojo.setSelectable(this.titleNode, false); 
    185185                this.setSelected(this.selected); 
     186                dojo.attr(this.titleTextNode, "id", this.domNode.id+"_title"); 
     187                dijit.setWaiState(this.focusNode, "labelledby", dojo.attr(this.titleTextNode, "id")); 
    186188        }, 
    187189 
     
    218220                this.selected = isSelected; 
    219221                dojo[(isSelected ? "addClass" : "removeClass")](this.titleNode,"dijitAccordionTitle-selected"); 
     222                dijit.setWaiState(this.focusNode, "expanded", isSelected); 
    220223                this.focusNode.setAttribute("tabIndex", isSelected ? "0" : "-1"); 
    221224        }, 
  • dijit/trunk/layout/templates/AccordionPane.html

    r13886 r14238  
    1 <div 
     1<div waiRole="presentation" 
    22        ><div dojoAttachPoint='titleNode,focusNode' dojoAttachEvent='ondijitclick:_onTitleClick,onkeypress:_onTitleKeyPress,onfocus:_handleFocus,onblur:_handleFocus,onmouseenter:_onTitleEnter,onmouseleave:_onTitleLeave' 
    3                 class='dijitAccordionTitle' wairole="tab" 
     3                class='dijitAccordionTitle' wairole="tab" waiState="expanded-false" 
    44                ><span class='dijitInline dijitAccordionArrow' waiRole="presentation"></span 
    55                ><span class='arrowTextUp' waiRole="presentation">+</span 
    66                ><span class='arrowTextDown' waiRole="presentation">-</span 
    77                ><span waiRole="presentation" dojoAttachPoint='titleTextNode' class='dijitAccordionText'>${title}</span></div 
    8         ><div><div dojoAttachPoint='containerNode' style='overflow: hidden; height: 1px; display: none' 
     8        ><div waiRole="presentation"><div dojoAttachPoint='containerNode' style='overflow: hidden; height: 1px; display: none' 
    99                class='dijitAccordionBody' wairole="tabpanel" 
    1010        ></div></div>