fix: missing label for textarea on a11y issues#308
Open
askiebaby wants to merge 1 commit intogitalk:masterfrom
Open
fix: missing label for textarea on a11y issues#308askiebaby wants to merge 1 commit intogitalk:masterfrom
askiebaby wants to merge 1 commit intogitalk:masterfrom
Conversation
booxood
reviewed
Feb 15, 2020
|
|
||
| <div className="gt-comment-content"> | ||
| <div className="gt-comment-header"> | ||
| <div className={`gt-comment-block-${user ? '2' : '1'}`} /> |
| </a> | ||
| } | ||
| <div className="gt-header-comment"> | ||
| <label for="gt-header-textarea" class="gt-header-label">{this.i18n.t('leave-a-comment')}</label> |
Collaborator
There was a problem hiding this comment.
这里需要调整下,React 里是 for -> htmlFor、 class -> className
<label htmlFor="gt-header-textarea" className="gt-header-label">{this.i18n.t('leave-a-comment')}</label>
| &:after { clear: both; } | ||
| } | ||
| visibility-hidden(){ | ||
| border: 0 !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
我在我的部落格有使用
gitalk作為評論的工具,發現留言區塊的<textarea>有a11y(訪問性)的問題,缺少了<label for...>,希望可以加上去,所以增加了螢幕閱讀器可見的 CSS 與<label>,但因為對 React 不熟悉,麻煩看看這樣有沒有問題,可以的話再幫我 Merge,有怪怪的地方請指出我的問題點,謝謝您。