Merge pull request #8942 from shoogle/toolbar-accessibility

Accessibility: Speech for all toolbar buttons
This commit is contained in:
Elnur Ismailzada 2021-09-15 09:48:24 +02:00 committed by GitHub
commit b78bdb97df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 12 deletions

View file

@ -85,6 +85,7 @@ FocusScope {
accessible.role: MUAccessible.Button
accessible.name: Boolean(root.text) ? root.text : root.toolTipTitle
accessible.description: root.toolTipDescription
accessible.visualItem: root
onTriggered: {

View file

@ -1243,32 +1243,32 @@ const UiActionList NotationUiActions::m_noteInputActions = {
),
UiAction("flat",
mu::context::UiCtxNotationOpened,
QT_TRANSLATE_NOOP("action", ""),
QT_TRANSLATE_NOOP("action", "Note input: ♭"),
QT_TRANSLATE_NOOP("action", "Flat"),
QT_TRANSLATE_NOOP("action", "Toggle accidental: Flat"),
IconCode::Code::FLAT
),
UiAction("flat2",
mu::context::UiCtxNotationOpened,
QT_TRANSLATE_NOOP("action", "Double "),
QT_TRANSLATE_NOOP("action", "Note input: Double ♭"),
QT_TRANSLATE_NOOP("action", "Double flat"),
QT_TRANSLATE_NOOP("action", "Toggle accidental: Double flat"),
IconCode::Code::FLAT_DOUBLE
),
UiAction("nat",
mu::context::UiCtxNotationOpened,
QT_TRANSLATE_NOOP("action", ""),
QT_TRANSLATE_NOOP("action", "Note input: ♮"),
QT_TRANSLATE_NOOP("action", "Natural"),
QT_TRANSLATE_NOOP("action", "Toggle accidental: Natural"),
IconCode::Code::NATURAL
),
UiAction("sharp",
mu::context::UiCtxNotationOpened,
QT_TRANSLATE_NOOP("action", ""),
QT_TRANSLATE_NOOP("action", "Note input: ♯"),
QT_TRANSLATE_NOOP("action", "Sharp"),
QT_TRANSLATE_NOOP("action", "Toggle accidental: Sharp"),
IconCode::Code::SHARP
),
UiAction("sharp2",
mu::context::UiCtxNotationOpened,
QT_TRANSLATE_NOOP("action", "Double "),
QT_TRANSLATE_NOOP("action", "Note input: Double ♯"),
QT_TRANSLATE_NOOP("action", "Double sharp"),
QT_TRANSLATE_NOOP("action", "Toggle accidental: Double sharp"),
IconCode::Code::SHARP_DOUBLE
),
UiAction("tie",

View file

@ -41,6 +41,7 @@ Rectangle {
id: keynavSub
name: "NotationToolBar"
enabled: root.enabled && root.visible
accessible.name: qsTrc("notation", "Notation toolbar")
onActiveChanged: {
if (active) {
root.activeFocusRequested()

View file

@ -45,6 +45,7 @@ Rectangle {
id: keynavSub
name: "NoteInputBar"
enabled: root.enabled && root.visible
accessible.name: qsTrc("notation", "Note Input toolbar")
}
NoteInputBarModel {

View file

@ -40,6 +40,7 @@ Rectangle {
id: navPanel
name: "UndoRedoToolBar"
enabled: root.enabled && root.visible
accessible.name: qsTrc("notation", "Undo Redo toolbar")
}
UndoRedoModel {

View file

@ -42,6 +42,7 @@ Rectangle {
id: navPanel
name: "PlaybackToolBar"
enabled: root.enabled && root.visible
accessible.name: qsTrc("playback", "Playback toolbar")
}
PlaybackToolBarModel {
@ -102,8 +103,6 @@ Rectangle {
toolTipTitle: modelData.title
toolTipDescription: modelData.description
toolTipShortcut: modelData.shortcut
accessible.name: modelData.title
accessible.description: modelData.description;
iconFont: ui.theme.toolbarIconsFont