Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ function ViewStyleControl({ viewStyle, onChangeViewStyle }) {
return (
<ViewControlsSection>
<ViewControlsButton
aria-label="list view option"
isActive={viewStyle === VIEW_STYLE_LIST}
onClick={() => onChangeViewStyle(VIEW_STYLE_LIST)}
>
<Icon type="list" />
</ViewControlsButton>
<ViewControlsButton
aria-label="grid view option"
isActive={viewStyle === VIEW_STYLE_GRID}
onClick={() => onChangeViewStyle(VIEW_STYLE_GRID)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ class EditorControl extends React.Component {
{({ css, cx }) => (
<ControlContainer
className={className}
aria-label={`${widgetName} field`}
css={css`
${isHidden && styleStrings.hidden};
`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const LibraryTitle = styled.h1`
function MediaLibraryHeader({ onClose, title, isPrivate }) {
return (
<div>
<CloseButton onClick={onClose}>
<CloseButton aria-label="close" onClick={onClose}>
<Icon type="close" />
</CloseButton>
<LibraryTitle isPrivate={isPrivate}>{title}</LibraryTitle>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function SettingsDropdown({ displayUrl, isTestRepo, imageUrl, onLogoutClick, t }
dropdownWidth="100px"
dropdownPosition="right"
renderButton={() => (
<AvatarDropdownButton>
<AvatarDropdownButton aria-label="account options dropdown">
<Avatar imageUrl={imageUrl} />
</AvatarDropdownButton>
)}
Expand Down
2 changes: 1 addition & 1 deletion packages/decap-cms-ui-default/src/ObjectWidgetTopBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ObjectWidgetTopBar extends React.Component {
return (
<TopBarContainer>
<ExpandButtonContainer hasHeading={!!heading}>
<ExpandButton onClick={onCollapseToggle} data-testid="expand-button">
<ExpandButton onClick={onCollapseToggle} data-testid="expand-button" aria-label={collapsed ? 'expand' : 'collapse'}>
<Icon type="chevron" direction={collapsed ? 'right' : 'down'} size="small" />
</ExpandButton>
{heading}
Expand Down
7 changes: 4 additions & 3 deletions packages/decap-cms-widget-datetime/src/DateTimeControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dayjs.extend(customParseFormat);
dayjs.extend(localizedFormat);
dayjs.extend(utc);

function Buttons({ t, handleChange, getNow }) {
function Buttons({ t, fieldName, handleChange, getNow }) {
return (
<div
css={css`
Expand All @@ -22,6 +22,7 @@ function Buttons({ t, handleChange, getNow }) {
`}
>
<button
aria-label={`set ${fieldName} to now`}
css={css`
${buttons.button}
${buttons.widget}
Expand Down Expand Up @@ -162,7 +163,7 @@ class DateTimeControl extends React.Component {
};

render() {
const { forID, value, classNameWrapper, setActiveStyle, setInactiveStyle, t, isDisabled } =
const { forID, field, value, classNameWrapper, setActiveStyle, setInactiveStyle, t, isDisabled } =
this.props;
const { inputType } = this.getFormat();

Expand Down Expand Up @@ -196,7 +197,7 @@ class DateTimeControl extends React.Component {
</span>
)}
{!isDisabled && (
<Buttons t={t} handleChange={v => this.handleChange(v)} getNow={() => this.getNow()} />
<Buttons t={t} fieldName={field.get('name')} handleChange={v => this.handleChange(v)} getNow={() => this.getNow()} />
)}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,11 @@ export default class Toolbar extends React.Component {
<ToolbarToggleLabel isActive={!rawMode} offPosition>
{t('editor.editorWidgets.markdown.richText')}
</ToolbarToggleLabel>
<StyledToggle active={rawMode} onChange={onToggleMode} />
<StyledToggle
active={rawMode}
onChange={onToggleMode}
aria-label={rawMode ? 'toggle to rich text mode' : 'toggle to markdown mode'}
/>
<ToolbarToggleLabel isActive={rawMode}>
{t('editor.editorWidgets.markdown.markdown')}
</ToolbarToggleLabel>
Expand Down
Loading