Variety of examples in order to see how inputs report when they are associated with label, aria-label, aria-labelledby, and aria-describedby — along with usage of placeholder, title, and simple landmark wrapping.
Expected Result: Label read, then Placeholder (as a description, or will it be ignored? and what happens with the placeholder is replaced with a typed value? does it continue to be announced?)
Expected Result: Uncertain. Will label still be announced in for-id associations where the label is not in the accessibility tree? (Note: this will fail an accessibility validator.)
Expected Result: Uncertain. Will label still be announced in for-id associations where the label is not in the accessibility tree? (Note: this will fail an accessibility validator.)
Expected Result: Label should be accessibly associated and announced when tabbed or browsed to.
Expected Result: Text value of aria-label should be accessible and announced when tabbed or browsed to.
Expected Result: Screen reader will likely announce, though placeholder is a “hint”. Field has no accessible name. (Note: this will fail an accessibility validator.)
Expected Result: Screen reader will announce. Title becomes the accessible name, though this the least accessible version for keyboard-only users, since most browsers won't show the title on focus.
Expected Result: Screen reader will announce the label as the accessible name of the field.
Expected Result: Screen reader will announce the label as the accessible name of the field. Placeholder may be announced as a description.
Expected Result: Same as 0e, but with possibility of announcement of the search landmark.
Expected Result: No valid accessible name, but screen readers may announce landmark role or the value currently in the field. (Note: this will fail an accessibility validator.)
Expected Result: Same as 0g, but with the possibility of announcement of the placeholder. (Note: this will fail an accessibility validator.)
Expected Result: Label read, then Describedby
Expected Result: Non-visual label announced and perhaps placeholder as a description
Expected Result: Labelledbys read, then Describedby
Expected Result: Labelledbys read, then Describedby, placeholder is ignored(?)
Expected Result: Label read, then Labelledby One, then Describedby One and Two
Expected Result: Label read, then Labelledby One, then Describedby One, Two, and Three
Expected Result: Labeledby One read, then label, then Describedby Three, Two, and One
Expected Result: ARIA label (HTML label is ignored), then Describedby Three, Two, One. (Note: ARIA labelledby will override the ARIA label. Do not use both.)
Expected Result: ARIA label (HTML label is ignored), then Describedby Three, Two, One.