Adding a label component for accessibility
The Label component associates an accessibility label with a Faces component. Labels are often used by screen readers and other similar programs.
Follow these steps to add an accessibility label to most Faces components.
Note: Do not use the Label component as a way to provide a name that appears for another component. For example, if you want Name to appear in front of an input component, use an Output Text component to create that type of label.
- Drag a Label component from the palette and drop it onto the component you want to label. The Configure Label dialog opens.
- Enter text for the label and click OK. The label component is inserted before the target component and the two components are linked. (If you want to specify additional attributes for the label component, make sure you select the label component and not the component that was created right next to it.)
- There is also a longer way to create a label component and you might need to follow these steps for certain components.
- Note the ID of the component for which you want to add a label. (See the Properties views of most components for the ID.)
- Drag a Label component from the palette to a blank area of the Faces JSP page.
- In the Properties view for the label, click ID to label and select the ID of the component you want to label. The label is now associated with the component.
Related concepts
Faces components
Related tasks
Creating Faces applications - overview
Related reference
Faces components reference
Faces attributes reference