Difference between revisions of "ARIA Textbox"

From Level Access Web Labs
Jump to navigation Jump to search
(Removed "for" attribute from a paragraph tag used as a label.)
 
Line 24: Line 24:
 
     <h1>Textbox with ARIA attributes</h1>
 
     <h1>Textbox with ARIA attributes</h1>
 
<p> This box uses the role textbox (with contenteditable on a div) with aria-labelledby attribute and the aria-multiline attribute set to true.
 
<p> This box uses the role textbox (with contenteditable on a div) with aria-labelledby attribute and the aria-multiline attribute set to true.
     <p id="aria-text-label" for="aria-text">ARIA Example:</p>  
+
     <p id="aria-text-label">ARIA Example:</p>  
 
   <div role="textbox" contenteditable="true" rows="4" cols="50" aria-labelledby="aria-text-label" id="aria-text" role="textbox" aria-multiline="true"></div>
 
   <div role="textbox" contenteditable="true" rows="4" cols="50" aria-labelledby="aria-text-label" id="aria-text" role="textbox" aria-multiline="true"></div>
 
 

Latest revision as of 20:20, 18 January 2019

ARIA Textbox Example

Standard textbox using the HTML <textarea> tag and no ARIA attributes


Textbox with ARIA attributes

This box uses the role textbox (with contenteditable on a div) with aria-labelledby attribute and the aria-multiline attribute set to true.

ARIA Example: