onClick={linkEvent(node, this.handleCommentUpvote)}
data-tippy-content={this.pointsTippy}
>
- <span class="mr-1 font-weight-bold">{this.state.score}</span>
+ <span
+ class="mr-1 font-weight-bold"
+ aria-label={i18n.t('number_of_points', {
+ count: this.state.score,
+ })}
+ >
+ {this.state.score}
+ </span>
</a>
<span className="mr-1">•</span>
<span>
this,
this.handleModRemoveShow
)}
+ aria-label={i18n.t('remove')}
>
{i18n.t('remove')}
</button>
this,
this.handleModRemoveSubmit
)}
+ aria-label={i18n.t('restore')}
>
{i18n.t('restore')}
</button>
this,
this.handleModBanFromCommunityShow
)}
+ aria-label={i18n.t('ban')}
>
{i18n.t('ban')}
</button>
this,
this.handleModBanFromCommunitySubmit
)}
+ aria-label={i18n.t('unban')}
>
{i18n.t('unban')}
</button>
this,
this.handleShowConfirmAppointAsMod
)}
+ aria-label={
+ this.isMod
+ ? i18n.t('remove_as_mod')
+ : i18n.t('appoint_as_mod')
+ }
>
{this.isMod
? i18n.t('remove_as_mod')
</button>
) : (
<>
- <button class="btn btn-link btn-animate text-muted">
+ <button
+ class="btn btn-link btn-animate text-muted"
+ aria-label={i18n.t('are_you_sure')}
+ >
{i18n.t('are_you_sure')}
</button>
<button
this,
this.handleAddModToCommunity
)}
+ aria-label={i18n.t('yes')}
>
{i18n.t('yes')}
</button>
this,
this.handleCancelConfirmAppointAsMod
)}
+ aria-label={i18n.t('no')}
>
{i18n.t('no')}
</button>
this,
this.handleShowConfirmTransferCommunity
)}
+ aria-label={i18n.t('transfer_community')}
>
{i18n.t('transfer_community')}
</button>
) : (
<>
- <button class="btn btn-link btn-animate text-muted">
+ <button
+ class="btn btn-link btn-animate text-muted"
+ aria-label={i18n.t('are_you_sure')}
+ >
{i18n.t('are_you_sure')}
</button>
<button
this,
this.handleTransferCommunity
)}
+ aria-label={i18n.t('yes')}
>
{i18n.t('yes')}
</button>
this
.handleCancelShowConfirmTransferCommunity
)}
+ aria-label={i18n.t('no')}
>
{i18n.t('no')}
</button>
this,
this.handleModBanShow
)}
+ aria-label={i18n.t('ban_from_site')}
>
{i18n.t('ban_from_site')}
</button>
this,
this.handleModBanSubmit
)}
+ aria-label={i18n.t('unban_from_site')}
>
{i18n.t('unban_from_site')}
</button>
this,
this.handleShowConfirmAppointAsAdmin
)}
+ aria-label={
+ this.isAdmin
+ ? i18n.t('remove_as_admin')
+ : i18n.t('appoint_as_admin')
+ }
>
{this.isAdmin
? i18n.t('remove_as_admin')
this,
this.handleAddAdmin
)}
+ aria-label={i18n.t('yes')}
>
{i18n.t('yes')}
</button>
this,
this.handleCancelConfirmAppointAsAdmin
)}
+ aria-label={i18n.t('no')}
>
{i18n.t('no')}
</button>
this,
this.handleShowConfirmTransferSite
)}
+ aria-label={i18n.t('transfer_site')}
>
{i18n.t('transfer_site')}
</button>
) : (
<>
- <button class="btn btn-link btn-animate text-muted">
+ <button
+ class="btn btn-link btn-animate text-muted"
+ aria-label={i18n.t('are_you_sure')}
+ >
{i18n.t('are_you_sure')}
</button>
<button
this,
this.handleTransferSite
)}
+ aria-label={i18n.t('yes')}
>
{i18n.t('yes')}
</button>
this,
this.handleCancelShowConfirmTransferSite
)}
+ aria-label={i18n.t('no')}
>
{i18n.t('no')}
</button>
class="form-inline"
onSubmit={linkEvent(this, this.handleModRemoveSubmit)}
>
+ <label
+ class="sr-only"
+ htmlFor={`mod-remove-reason-${cv.comment.id}`}
+ >
+ {i18n.t('reason')}
+ </label>
<input
type="text"
+ id={`mod-remove-reason-${cv.comment.id}`}
class="form-control mr-2"
placeholder={i18n.t('reason')}
value={this.state.removeReason}
onInput={linkEvent(this, this.handleModRemoveReasonChange)}
/>
- <button type="submit" class="btn btn-secondary">
+ <button
+ type="submit"
+ class="btn btn-secondary"
+ aria-label={i18n.t('remove_comment')}
+ >
{i18n.t('remove_comment')}
</button>
</form>
{/* <input type="date" class="form-control mr-2" placeholder={i18n.t('expires')} value={this.state.banExpires} onInput={linkEvent(this, this.handleModBanExpiresChange)} /> */}
{/* </div> */}
<div class="form-group row">
- <button type="submit" class="btn btn-secondary">
+ <button
+ type="submit"
+ class="btn btn-secondary"
+ aria-label={i18n.t('ban')}
+ >
{i18n.t('ban')} {cv.creator.name}
</button>
</div>
>
<input
type="text"
+ id="communities-search"
class="form-control mr-2 mb-2"
value={this.state.searchText}
placeholder={`${i18n.t('search')}...`}
required
minLength={3}
/>
+ <label class="sr-only" htmlFor="communities-search">
+ {i18n.t('search')}
+ </label>
<button type="submit" class="btn btn-secondary mr-2 mb-2">
<span>{i18n.t('search')}</span>
</button>
rel="noopener"
>
<svg class="icon text-muted small">
- <use xlinkHref="#icon-rss">#</use>
+ <use xlinkHref="#icon-rss"></use>
</svg>
</a>
</div>
rel="noopener"
>
<svg class="icon ml-2 text-muted small">
- <use xlinkHref="#icon-rss">#</use>
+ <use xlinkHref="#icon-rss"></use>
</svg>
</a>
</small>
title="RSS"
>
<svg class="icon text-muted small">
- <use xlinkHref="#icon-rss">#</use>
+ <use xlinkHref="#icon-rss"></use>
</svg>
</a>
)}
/>
)}
</div>
+ <label class="sr-only" htmlFor={this.id}>
+ {i18n.t('body')}
+ </label>
</div>
<div class="row">
<div class="col-sm-12 d-flex flex-wrap">
<button
class="btn btn-sm text-muted"
data-tippy-content={i18n.t('bold')}
+ aria-label={i18n.t('bold')}
onClick={linkEvent(this, this.handleInsertBold)}
>
<svg class="icon icon-inline">
<button
class="btn btn-sm text-muted"
data-tippy-content={i18n.t('italic')}
+ aria-label={i18n.t('italic')}
onClick={linkEvent(this, this.handleInsertItalic)}
>
<svg class="icon icon-inline">
<button
class="btn btn-sm text-muted"
data-tippy-content={i18n.t('link')}
+ aria-label={i18n.t('link')}
onClick={linkEvent(this, this.handleInsertLink)}
>
<svg class="icon icon-inline">
<use xlinkHref="#icon-bell"></use>
</svg>
{this.state.unreadCount > 0 && (
- <span class="mx-1 badge badge-light">
+ <span
+ class="mx-1 badge badge-light"
+ aria-label={`${this.state.unreadCount} ${i18n.t(
+ 'unread_messages'
+ )}`}
+ >
{this.state.unreadCount}
</span>
)}
onSubmit={linkEvent(this, this.handleSearchSubmit)}
>
<input
+ id="search-input"
class={`form-control mr-0 search-input ${
this.state.toggleSearch ? 'show-input' : 'hide-input'
}`}
placeholder={i18n.t('search')}
onBlur={linkEvent(this, this.handleSearchBlur)}
></input>
+ <label class="sr-only" htmlFor="search-input">
+ {i18n.t('search')}
+ </label>
<button
name="search-btn"
onClick={linkEvent(this, this.handleSearchBtn)}
class="px-1 btn btn-link"
style="color: var(--gray)"
+ aria-label={i18n.t('search')}
>
<svg class="icon">
<use xlinkHref="#icon-search"></use>
<use xlinkHref="#icon-bell"></use>
</svg>
{this.state.unreadCount > 0 && (
- <span class="ml-1 badge badge-light">
+ <span
+ class="ml-1 badge badge-light"
+ aria-label={`${this.state.unreadCount} ${i18n.t(
+ 'unread_messages'
+ )}`}
+ >
{this.state.unreadCount}
</span>
)}
</div>
<div class="form-group row">
- <label class="col-sm-2 col-form-label" htmlFor={this.id}>
- {i18n.t('body')}
- </label>
+ <label class="col-sm-2 col-form-label">{i18n.t('body')}</label>
<div class="col-sm-10">
<MarkdownTextArea
initialContent={this.state.postForm.body}
class="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleEditClick)}
data-tippy-content={i18n.t('edit')}
+ aria-label={i18n.t('edit')}
>
<svg class="icon icon-inline">
<use xlinkHref="#icon-edit"></use>
data-tippy-content={
!post_view.post.deleted ? i18n.t('delete') : i18n.t('restore')
}
+ aria-label={
+ !post_view.post.deleted ? i18n.t('delete') : i18n.t('restore')
+ }
>
<svg
class={`icon icon-inline ${
class="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleViewSource)}
data-tippy-content={i18n.t('view_source')}
+ aria-label={i18n.t('view_source')}
>
<svg
class={`icon icon-inline ${
data-tippy-content={
post_view.post.locked ? i18n.t('unlock') : i18n.t('lock')
}
+ aria-label={
+ post_view.post.locked ? i18n.t('unlock') : i18n.t('lock')
+ }
>
<svg
class={`icon icon-inline ${
? i18n.t('unsticky')
: i18n.t('sticky')
}
+ aria-label={
+ post_view.post.stickied
+ ? i18n.t('unsticky')
+ : i18n.t('sticky')
+ }
>
<svg
class={`icon icon-inline ${
<button
class="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleModRemoveShow)}
+ aria-label={i18n.t('remove')}
>
{i18n.t('remove')}
</button>
<button
class="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleModRemoveSubmit)}
+ aria-label={i18n.t('restore')}
>
{i18n.t('restore')}
</button>
this,
this.handleModBanFromCommunityShow
)}
+ aria-label={i18n.t('ban')}
>
{i18n.t('ban')}
</button>
this,
this.handleModBanFromCommunitySubmit
)}
+ aria-label={i18n.t('unban')}
>
{i18n.t('unban')}
</button>
<button
class="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleAddModToCommunity)}
+ aria-label={
+ this.isMod
+ ? i18n.t('remove_as_mod')
+ : i18n.t('appoint_as_mod')
+ }
>
{this.isMod
? i18n.t('remove_as_mod')
this,
this.handleShowConfirmTransferCommunity
)}
+ aria-label={i18n.t('transfer_community')}
>
{i18n.t('transfer_community')}
</button>
) : (
<>
- <button class="d-inline-block mr-1 btn btn-link btn-animate text-muted py-0">
+ <button
+ class="d-inline-block mr-1 btn btn-link btn-animate text-muted py-0"
+ aria-label={i18n.t('are_you_sure')}
+ >
{i18n.t('are_you_sure')}
</button>
<button
class="btn btn-link btn-animate text-muted py-0 d-inline-block mr-1"
+ aria-label={i18n.t('yes')}
onClick={linkEvent(this, this.handleTransferCommunity)}
>
{i18n.t('yes')}
this,
this.handleCancelShowConfirmTransferCommunity
)}
+ aria-label={i18n.t('no')}
>
{i18n.t('no')}
</button>
<button
class="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleModBanShow)}
+ aria-label={i18n.t('ban_from_site')}
>
{i18n.t('ban_from_site')}
</button>
<button
class="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleModBanSubmit)}
+ aria-label={i18n.t('unban_from_site')}
>
{i18n.t('unban_from_site')}
</button>
<button
class="btn btn-link btn-animate text-muted py-0"
onClick={linkEvent(this, this.handleAddAdmin)}
+ aria-label={
+ this.isAdmin
+ ? i18n.t('remove_as_admin')
+ : i18n.t('appoint_as_admin')
+ }
>
{this.isAdmin
? i18n.t('remove_as_admin')
this,
this.handleShowConfirmTransferSite
)}
+ aria-label={i18n.t('transfer_site')}
>
{i18n.t('transfer_site')}
</button>
) : (
<>
- <button class="btn btn-link btn-animate text-muted py-0 d-inline-block mr-1">
+ <button
+ class="btn btn-link btn-animate text-muted py-0 d-inline-block mr-1"
+ aria-label={i18n.t('are_you_sure')}
+ >
{i18n.t('are_you_sure')}
</button>
<button
class="btn btn-link btn-animate text-muted py-0 d-inline-block mr-1"
onClick={linkEvent(this, this.handleTransferSite)}
+ aria-label={i18n.t('yes')}
>
{i18n.t('yes')}
</button>
this,
this.handleCancelShowConfirmTransferSite
)}
+ aria-label={i18n.t('no')}
>
{i18n.t('no')}
</button>
class="form-inline"
onSubmit={linkEvent(this, this.handleModRemoveSubmit)}
>
+ <label class="sr-only" htmlFor="post-listing-remove-reason">
+ {i18n.t('reason')}
+ </label>
<input
type="text"
+ id="post-listing-remove-reason"
class="form-control mr-2"
placeholder={i18n.t('reason')}
value={this.state.removeReason}
onInput={linkEvent(this, this.handleModRemoveReasonChange)}
/>
- <button type="submit" class="btn btn-secondary">
+ <button
+ type="submit"
+ class="btn btn-secondary"
+ aria-label={i18n.t('remove_post')}
+ >
{i18n.t('remove_post')}
</button>
</form>
{this.state.showBanDialog && (
<form onSubmit={linkEvent(this, this.handleModBanBothSubmit)}>
<div class="form-group row">
- <label class="col-form-label" htmlFor="post-listing-reason">
+ <label class="col-form-label" htmlFor="post-listing-ban-reason">
{i18n.t('reason')}
</label>
<input
type="text"
- id="post-listing-reason"
+ id="post-listing-ban-reason"
class="form-control mr-2"
placeholder={i18n.t('reason')}
value={this.state.banReason}
{/* <input type="date" class="form-control mr-2" placeholder={i18n.t('expires')} value={this.state.banExpires} onInput={linkEvent(this, this.handleModBanExpiresChange)} /> */}
{/* </div> */}
<div class="form-group row">
- <button type="submit" class="btn btn-secondary">
+ <button
+ type="submit"
+ class="btn btn-secondary"
+ aria-label={i18n.t('ban')}
+ >
{i18n.t('ban')} {post.creator.name}
</button>
</div>
required
minLength={3}
/>
- <button type="submit" class="btn btn-secondary mr-2 mb-2">
+ <button
+ type="submit"
+ class="btn btn-secondary mr-2 mb-2"
+ aria-label={i18n.t('search')}
+ >
{this.state.loading ? (
<svg class="icon icon-spinner spin">
<use xlinkHref="#icon-spinner"></use>
title="RSS"
>
<svg class="icon mx-2 text-muted small">
- <use xlinkHref="#icon-rss">#</use>
+ <use xlinkHref="#icon-rss"></use>
</svg>
</a>
</div>