]> Untitled Git - lemmy-ui.git/commitdiff
Adding more aria labels based on tota11y recs. #170
authorDessalines <tyhou13@gmx.com>
Tue, 9 Feb 2021 16:21:24 +0000 (11:21 -0500)
committerDessalines <tyhou13@gmx.com>
Tue, 9 Feb 2021 16:21:24 +0000 (11:21 -0500)
src/shared/components/comment-node.tsx
src/shared/components/communities.tsx
src/shared/components/community.tsx
src/shared/components/inbox.tsx
src/shared/components/main.tsx
src/shared/components/markdown-textarea.tsx
src/shared/components/navbar.tsx
src/shared/components/post-form.tsx
src/shared/components/post-listing.tsx
src/shared/components/search.tsx
src/shared/components/user.tsx

index bf57a59d831d4a1d90a66de18f994e1d737716bd..33e719e2ad86135658878344f59be09460feac0e 100644 (file)
@@ -204,7 +204,14 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                 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>
@@ -424,6 +431,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                     this,
                                     this.handleModRemoveShow
                                   )}
+                                  aria-label={i18n.t('remove')}
                                 >
                                   {i18n.t('remove')}
                                 </button>
@@ -434,6 +442,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                     this,
                                     this.handleModRemoveSubmit
                                   )}
+                                  aria-label={i18n.t('restore')}
                                 >
                                   {i18n.t('restore')}
                                 </button>
@@ -451,6 +460,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                       this,
                                       this.handleModBanFromCommunityShow
                                     )}
+                                    aria-label={i18n.t('ban')}
                                   >
                                     {i18n.t('ban')}
                                   </button>
@@ -461,6 +471,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                       this,
                                       this.handleModBanFromCommunitySubmit
                                     )}
+                                    aria-label={i18n.t('unban')}
                                   >
                                     {i18n.t('unban')}
                                   </button>
@@ -474,6 +485,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                       this,
                                       this.handleShowConfirmAppointAsMod
                                     )}
+                                    aria-label={
+                                      this.isMod
+                                        ? i18n.t('remove_as_mod')
+                                        : i18n.t('appoint_as_mod')
+                                    }
                                   >
                                     {this.isMod
                                       ? i18n.t('remove_as_mod')
@@ -481,7 +497,10 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                   </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
@@ -490,6 +509,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                         this,
                                         this.handleAddModToCommunity
                                       )}
+                                      aria-label={i18n.t('yes')}
                                     >
                                       {i18n.t('yes')}
                                     </button>
@@ -499,6 +519,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                         this,
                                         this.handleCancelConfirmAppointAsMod
                                       )}
+                                      aria-label={i18n.t('no')}
                                     >
                                       {i18n.t('no')}
                                     </button>
@@ -517,12 +538,16 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                   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
@@ -531,6 +556,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                     this,
                                     this.handleTransferCommunity
                                   )}
+                                  aria-label={i18n.t('yes')}
                                 >
                                   {i18n.t('yes')}
                                 </button>
@@ -541,6 +567,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                     this
                                       .handleCancelShowConfirmTransferCommunity
                                   )}
+                                  aria-label={i18n.t('no')}
                                 >
                                   {i18n.t('no')}
                                 </button>
@@ -557,6 +584,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                       this,
                                       this.handleModBanShow
                                     )}
+                                    aria-label={i18n.t('ban_from_site')}
                                   >
                                     {i18n.t('ban_from_site')}
                                   </button>
@@ -567,6 +595,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                       this,
                                       this.handleModBanSubmit
                                     )}
+                                    aria-label={i18n.t('unban_from_site')}
                                   >
                                     {i18n.t('unban_from_site')}
                                   </button>
@@ -580,6 +609,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                       this,
                                       this.handleShowConfirmAppointAsAdmin
                                     )}
+                                    aria-label={
+                                      this.isAdmin
+                                        ? i18n.t('remove_as_admin')
+                                        : i18n.t('appoint_as_admin')
+                                    }
                                   >
                                     {this.isAdmin
                                       ? i18n.t('remove_as_admin')
@@ -596,6 +630,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                         this,
                                         this.handleAddAdmin
                                       )}
+                                      aria-label={i18n.t('yes')}
                                     >
                                       {i18n.t('yes')}
                                     </button>
@@ -605,6 +640,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                         this,
                                         this.handleCancelConfirmAppointAsAdmin
                                       )}
+                                      aria-label={i18n.t('no')}
                                     >
                                       {i18n.t('no')}
                                     </button>
@@ -623,12 +659,16 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                   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
@@ -637,6 +677,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                     this,
                                     this.handleTransferSite
                                   )}
+                                  aria-label={i18n.t('yes')}
                                 >
                                   {i18n.t('yes')}
                                 </button>
@@ -646,6 +687,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
                                     this,
                                     this.handleCancelShowConfirmTransferSite
                                   )}
+                                  aria-label={i18n.t('no')}
                                 >
                                   {i18n.t('no')}
                                 </button>
@@ -667,14 +709,25 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
             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>
@@ -717,7 +770,11 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
             {/*   <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>
index e90c09decd8dbfb9aaf878cf2b78ff11b35b18b2..62814b7e8e41bce3197935939020fc8e81ef9284 100644 (file)
@@ -199,6 +199,7 @@ export class Communities extends Component<any, CommunitiesState> {
       >
         <input
           type="text"
+          id="communities-search"
           class="form-control mr-2 mb-2"
           value={this.state.searchText}
           placeholder={`${i18n.t('search')}...`}
@@ -206,6 +207,9 @@ export class Communities extends Component<any, CommunitiesState> {
           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>
index 86ac243a475ebe2d9f27176e038173c57216d256..c16b14344c9d5deb49e46ad34cab8fca73905129 100644 (file)
@@ -351,7 +351,7 @@ export class Community extends Component<any, State> {
           rel="noopener"
         >
           <svg class="icon text-muted small">
-            <use xlinkHref="#icon-rss">#</use>
+            <use xlinkHref="#icon-rss"></use>
           </svg>
         </a>
       </div>
index ab0c312e4c2811c975473711192bc0f9b06d7807..e9f52e130e8a261c75f49d75779ef92cf090b876 100644 (file)
@@ -158,7 +158,7 @@ export class Inbox extends Component<any, InboxState> {
                     rel="noopener"
                   >
                     <svg class="icon ml-2 text-muted small">
-                      <use xlinkHref="#icon-rss">#</use>
+                      <use xlinkHref="#icon-rss"></use>
                     </svg>
                   </a>
                 </small>
index 2d4b7d7824b7ac08517774e15c73b18d5c51aac7..de7bc4f47b41e21038648567893a03ff0abfe72c 100644 (file)
@@ -602,7 +602,7 @@ export class Main extends Component<any, MainState> {
             title="RSS"
           >
             <svg class="icon text-muted small">
-              <use xlinkHref="#icon-rss">#</use>
+              <use xlinkHref="#icon-rss"></use>
             </svg>
           </a>
         )}
index cffc43225733effe77fd32f2e158b2b114a3eeff..fe34b2054d3197cdf19fe54bca21cb3f0b522ffe 100644 (file)
@@ -138,6 +138,9 @@ export class MarkdownTextArea extends Component<
               />
             )}
           </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">
@@ -180,6 +183,7 @@ export class MarkdownTextArea extends Component<
             <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">
@@ -189,6 +193,7 @@ export class MarkdownTextArea extends Component<
             <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">
@@ -198,6 +203,7 @@ export class MarkdownTextArea extends Component<
             <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">
index b4d2cbe516e3087548d5f3b1b170de2f0c809678..dee3fc5234a9f9e36ac8fd19de9cbd03f38d081b 100644 (file)
@@ -202,7 +202,12 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
                 <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>
               )}
@@ -288,6 +293,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
                 onSubmit={linkEvent(this, this.handleSearchSubmit)}
               >
                 <input
+                  id="search-input"
                   class={`form-control mr-0 search-input ${
                     this.state.toggleSearch ? 'show-input' : 'hide-input'
                   }`}
@@ -298,11 +304,15 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
                   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>
@@ -323,7 +333,12 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
                         <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>
                       )}
index 553a6e6aae374c058a4bdf906dcfb83b465d2405..4435f29f45cdfc4f79441039b033dfb58922930a 100644 (file)
@@ -283,9 +283,7 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
           </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}
index 2d0192b883aa2e402d0272e7e1f716c711f100eb..1255b3d69b8dc6911f7e92c5456cafbc4a18108d 100644 (file)
@@ -681,6 +681,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                 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>
@@ -692,6 +693,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                 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 ${
@@ -722,6 +726,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                   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 ${
@@ -740,6 +745,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                     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 ${
@@ -757,6 +765,11 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                         ? i18n.t('unsticky')
                         : i18n.t('sticky')
                     }
+                    aria-label={
+                      post_view.post.stickied
+                        ? i18n.t('unsticky')
+                        : i18n.t('sticky')
+                    }
                   >
                     <svg
                       class={`icon icon-inline ${
@@ -774,6 +787,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                   <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>
@@ -781,6 +795,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                   <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>
@@ -795,6 +810,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                           this,
                           this.handleModBanFromCommunityShow
                         )}
+                        aria-label={i18n.t('ban')}
                       >
                         {i18n.t('ban')}
                       </button>
@@ -805,6 +821,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                           this,
                           this.handleModBanFromCommunitySubmit
                         )}
+                        aria-label={i18n.t('unban')}
                       >
                         {i18n.t('unban')}
                       </button>
@@ -814,6 +831,11 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                       <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')
@@ -833,16 +855,21 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                       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')}
@@ -853,6 +880,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                         this,
                         this.handleCancelShowConfirmTransferCommunity
                       )}
+                      aria-label={i18n.t('no')}
                     >
                       {i18n.t('no')}
                     </button>
@@ -866,6 +894,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                       <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>
@@ -873,6 +902,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                       <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>
@@ -881,6 +911,11 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                     <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')
@@ -899,17 +934,22 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                       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>
@@ -919,6 +959,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
                         this,
                         this.handleCancelShowConfirmTransferSite
                       )}
+                      aria-label={i18n.t('no')}
                     >
                       {i18n.t('no')}
                     </button>
@@ -940,14 +981,22 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
             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>
@@ -955,12 +1004,12 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
         {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}
@@ -987,7 +1036,11 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
             {/*   <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>
index 1b61e3bf04591f3e2d2f3361ce0e35a205eb405a..448b5175aaa4af12bf46debda850b5504840dd5e 100644 (file)
@@ -214,7 +214,11 @@ export class Search extends Component<any, SearchState> {
           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>
index 0dbe2524cdadd8f6cab1b627d3387d8762af412a..23faec9ecd7770095d1335dea57929c7073185d2 100644 (file)
@@ -394,7 +394,7 @@ export class User extends Component<any, UserState> {
           title="RSS"
         >
           <svg class="icon mx-2 text-muted small">
-            <use xlinkHref="#icon-rss">#</use>
+            <use xlinkHref="#icon-rss"></use>
           </svg>
         </a>
       </div>