FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: missing label for textarea on a11y issues by wenhua-swe · Pull Request #308 · gitalk/gitalk · GitHub

/ gitalk Public

fix: missing label for textarea on a11y issues - #308

Open
wenhua-swe wants to merge 1 commit into
gitalk:masterfrom
wenhua-swe:fix/a11y
Open

fix: missing label for textarea on a11y issues#308
wenhua-swe wants to merge 1 commit into
gitalk:masterfrom
wenhua-swe:fix/a11y

Conversation

Copy link
Copy Markdown

我在我的部落格有使用 gitalk 作為評論的工具,發現留言區塊的 <textarea> 有 a11y(訪問性) 的問題,缺少了 <label for...>,希望可以加上去,所以增加了螢幕閱讀器可見的 CSS 與 <label>,但因為對 React 不熟悉,麻煩看看這樣有沒有問題,可以的話再幫我 Merge,有怪怪的地方請指出我的問題點,謝謝您。

Copy link
Copy Markdown

Coverage remained the same at 99.065% when pulling 778416b on askiebaby:fix/a11y into 71db14c on gitalk:master.

booxood left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

另外, dist 目录不要提交

Comment thread src/component/comment.jsx

<div className="gt-comment-content">
<div className="gt-comment-header">
<div className={`gt-comment-block-${user ? '2' : '1'}`} />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

这里增加一个 div 是什么用途呀?

Comment thread src/gitalk.jsx
</a>
}
<div className="gt-header-comment">
<label for="gt-header-textarea" class="gt-header-label">{this.i18n.t('leave-a-comment')}</label>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

这里需要调整下,React 里是 for -> htmlFor、 class -> className

<label htmlFor="gt-header-textarea" className="gt-header-label">{this.i18n.t('leave-a-comment')}</label>

Comment thread src/style/index.styl
&:after { clear: both; }
}
visibility-hidden(){
border: 0 !important;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

缩减

ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL