Textarea shows both placeholder and aria-placeholder, and thats an issue
See original GitHub issueUsing accessibility-checker we see that there is an issue with textarea - its adding both placeholer and aria-placeholder which is an issue.
As an aside, in my code I do not add placeholder at all
<TextArea
id='description'
name='description'
{...description}
labelText={t('addSecret.secretForm.description')}
invalid={!!(descriptionMeta.touched && descriptionMeta.error)}
invalidText={descriptionMeta.error}
/>
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
aria-placeholder - Accessibility - MDN Web Docs - Mozilla
A placeholder is text that appears in the form control when it has no value set. The HTML placeholder attribute enables providing a...
Read more >html - what is the difference between placeholder and aria ...
A placeholder is a text that appears in the form control when it has no value set. The HTML placeholder attribute enables providing...
Read more >Does Placeholder text AND aria-describedby work on a form ...
I've run across high profile sites that want to do the right thing. They have a form with a proper label, placeholder text...
Read more >Don't Use The Placeholder Attribute - Smashing Magazine
The placeholder attribute contains a surprising amount of issues that prevent it from delivering on what it promises. Let's clarify why you ...
Read more >HTML textarea placeholder Attribute - W3Schools
The placeholder attribute specifies a short hint that describes the expected value of a text area. The short hint is displayed in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dakahn
I think you can just use “or null” to make sure the placeholder is not used if it is not given, i.e.
Do you need to support IE11? If not, then you don’t need to use
aria-placeholder
at all, because modern browsers all map the placeholder attribute of HTML textarea toaria-placeholder
automatically. (Actually, even in IE11, NVDA reads the placeholder, but JAWS doesn’t.)The only “modern” reason to use
aria-placeholder
would be if you decide to switch the implementation to adiv contenteditable
or something that doesn’t supportplaceholder
… but then you would have a bunch more work to do, so don’t do that. 😃This is not a fix, it does not fix the issue, it just hides it if its null. The issue is that there is BOTH placeholder and aria-placeholder So are you saying this is ok, and the tester is wrong?