Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
34 changes: 32 additions & 2 deletions src/settings/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@
}
}

// Reset default button chrome so the focusable rename control keeps
// the inline text appearance of the former <a>. Scoped to the button
// so the sibling <a class="action-rename"> in the groups column keeps
// its own link styling.
button.action-rename {
display: inline;
padding: 0;
margin: 0;
border: none;
background: none;
font: inherit;
color: inherit;
text-align: inherit;
cursor: pointer;
}

.action-rename {
&::after {
display: inline-block;
Expand Down Expand Up @@ -87,7 +103,8 @@
width: 32px;
}

a.icon {
a.icon,
button.icon {
margin-left: 5px;
}
}
Expand Down Expand Up @@ -121,6 +138,18 @@
}
}

// Strip default button chrome from the icon-only action buttons so
// the focusable controls keep the glyph-only look of the former <a>.
button.icon {
width: 16px;
height: 16px;
padding: 0;
border: none;
background-color: transparent;
vertical-align: middle;
cursor: pointer;
}

.newgroup-name {
width: 200px;
max-width: calc(100% - 40px);
Expand Down Expand Up @@ -163,7 +192,8 @@
color: var(--color-text-lighter);
}
&.mountpoint {
a {
a,
button.action-rename {
color: var(--color-main-text);
font-weight: bold;
}
Expand Down
14 changes: 9 additions & 5 deletions src/settings/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,17 @@ export class App extends Component<unknown, AppState> implements OC.Plugin<OC.Se
}}
initialValue={folder.mount_point}
/>
: <a
: <button
type="button"
className="action-rename"
aria-label={t('groupfolders', 'Rename "{mountPoint}"', { mountPoint: folder.mount_point })}
onClick={event => {
event.stopPropagation()
this.setState({ editingMountPoint: id })
}}
>
{folder.mount_point}
</a>
</button>
}
</td>
<td className="groups">
Expand Down Expand Up @@ -365,9 +367,11 @@ export class App extends Component<unknown, AppState> implements OC.Plugin<OC.Se
}
</td>
<td className="remove">
<a className="icon icon-delete icon-visible"
onClick={this.deleteFolder.bind(this, folder)}
title={t('groupfolders', 'Delete')}/>
<button type="button"
className="icon icon-delete icon-visible"
aria-label={t('groupfolders', 'Delete')}
onClick={this.deleteFolder.bind(this, folder)}
title={t('groupfolders', 'Delete')}/>
</td>
</tr>
})
Expand Down
Loading