mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 14:21:13 +00:00
Merge remote-tracking branch 'lemmy/main' into feat/vote-components
* lemmy/main: fix(a11y): Restore aria-activedescendant chore: Empty commit to re-trigger Woodpecker fix(a11y): Make foreground of 'remove image button' white fix(a11y): Add alt text to emojis form fix(a11y): Fix some a11y markup in Searchable Select component fix(a11y): Change image remove button to true button element fix: Ignore rule for clickaway div; 'Esc' works for this fix: Fix another class fix: Fix some Bootstrap 5 font classes
This commit is contained in:
commit
731c407e31
4 changed files with 14 additions and 11 deletions
|
@ -276,10 +276,7 @@ hr {
|
|||
}
|
||||
|
||||
.mini-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 2px;
|
||||
display: block;
|
||||
height: 1.5em;
|
||||
width: 1.5em;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
|
|
|
@ -50,6 +50,7 @@ export class EmojiPicker extends Component<EmojiPickerProps, EmojiPickerState> {
|
|||
pickerOptions={{}}
|
||||
></EmojiMart>
|
||||
</div>
|
||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
|
||||
<div
|
||||
onClick={linkEvent(this, this.togglePicker)}
|
||||
className="click-away-container"
|
||||
|
|
|
@ -36,7 +36,9 @@ export class ImageUploadForm extends Component<
|
|||
<label htmlFor={this.id} className="pointer text-muted small fw-bold">
|
||||
{this.props.imageSrc ? (
|
||||
<span className="d-inline-block position-relative">
|
||||
{/* TODO: Create "Current Iamge" translation for alt text */}
|
||||
<img
|
||||
alt=""
|
||||
src={this.props.imageSrc}
|
||||
height={this.props.rounded ? 60 : ""}
|
||||
width={this.props.rounded ? 60 : ""}
|
||||
|
@ -44,12 +46,14 @@ export class ImageUploadForm extends Component<
|
|||
this.props.rounded ? "rounded-circle" : ""
|
||||
}`}
|
||||
/>
|
||||
<a
|
||||
<button
|
||||
className="position-absolute d-block p-0 end-0 border-0 top-0 bg-transparent text-white"
|
||||
type="button"
|
||||
onClick={linkEvent(this, this.handleRemoveImage)}
|
||||
aria-label={I18NextService.i18n.t("remove")}
|
||||
>
|
||||
<Icon icon="x" classes="mini-overlay" />
|
||||
</a>
|
||||
</button>
|
||||
</span>
|
||||
) : (
|
||||
<span className="btn btn-secondary">{this.props.uploadTitle}</span>
|
||||
|
|
|
@ -106,8 +106,12 @@ export class SearchableSelect extends Component<
|
|||
<button
|
||||
id={id}
|
||||
type="button"
|
||||
role="combobox"
|
||||
className="form-select d-inline-block text-start"
|
||||
aria-haspopup="listbox"
|
||||
aria-controls="searchable-select-input"
|
||||
aria-activedescendant={options[selectedIndex].label}
|
||||
aria-expanded={false}
|
||||
data-bs-toggle="dropdown"
|
||||
onClick={linkEvent(this, focusSearch)}
|
||||
ref={this.toggleButtonRef}
|
||||
|
@ -116,17 +120,14 @@ export class SearchableSelect extends Component<
|
|||
? `${I18NextService.i18n.t("loading")}${loadingEllipses}`
|
||||
: options[selectedIndex].label}
|
||||
</button>
|
||||
<div
|
||||
role="combobox"
|
||||
aria-activedescendant={options[selectedIndex].label}
|
||||
className="modlog-choices-font-size dropdown-menu w-100 p-2"
|
||||
>
|
||||
<div className="modlog-choices-font-size dropdown-menu w-100 p-2">
|
||||
<div className="input-group">
|
||||
<span className="input-group-text">
|
||||
{loading ? <Spinner /> : <Icon icon="search" />}
|
||||
</span>
|
||||
<input
|
||||
type="text"
|
||||
id="searchable-select-input"
|
||||
className="form-control"
|
||||
ref={this.searchInputRef}
|
||||
onInput={linkEvent(this, handleSearch)}
|
||||
|
|
Loading…
Reference in a new issue