diff --git a/src/localFileConfiguration/package/contents/ui/main.qml b/src/localFileConfiguration/package/contents/ui/main.qml --- a/src/localFileConfiguration/package/contents/ui/main.qml +++ b/src/localFileConfiguration/package/contents/ui/main.qml @@ -79,6 +79,8 @@ ToolButton { iconName: 'list-remove' + Accessible.onPressAction: onClicked + anchors.top: parent.top anchors.right: parent.right @@ -129,6 +131,8 @@ text: i18n("Add new path") onClicked: fileDialog.open() + Accessible.onPressAction: onClicked + Layout.alignment: Qt.AlignTop | Qt.AlignLeft FileDialog { diff --git a/src/qml/DataGridView.qml b/src/qml/DataGridView.qml --- a/src/qml/DataGridView.qml +++ b/src/qml/DataGridView.qml @@ -37,6 +37,9 @@ focus: true + Accessible.role: Accessible.Pane + Accessible.name: mainTitle + DataModel { id: realModel } diff --git a/src/qml/ElisaMainWindow.qml b/src/qml/ElisaMainWindow.qml --- a/src/qml/ElisaMainWindow.qml +++ b/src/qml/ElisaMainWindow.qml @@ -40,6 +40,9 @@ title: i18n("Elisa") + Accessible.role: Accessible.Application + Accessible.name: title + property var goBackAction: elisa.action("go_back") property var seekAction: elisa.action("Seek") property var scrubAction: elisa.action("Scrub") diff --git a/src/qml/FileBrowserDelegate.qml b/src/qml/FileBrowserDelegate.qml --- a/src/qml/FileBrowserDelegate.qml +++ b/src/qml/FileBrowserDelegate.qml @@ -53,6 +53,9 @@ Keys.onReturnPressed: gridEntry.enqueue(fileUrl) Keys.onEnterPressed: gridEntry.enqueue(fileUrl) + Accessible.role: Accessible.ListItem + Accessible.name: fileName + Rectangle { id: stateIndicator @@ -140,6 +143,9 @@ metadataLoader.active = false } } + + Accessible.onPressAction: onClicked + ToolTip { text: i18nc("Show track metadata", "View Details") } @@ -159,6 +165,9 @@ onClicked: isDirectory ? open(fileUrl) : enqueue(fileUrl) + + Accessible.onPressAction: onClicked + ToolTip { text: isDirectory ? i18nc("Open view of the container", "Open") : @@ -177,6 +186,9 @@ icon.name: "media-playback-start" onClicked: replaceAndPlay(fileUrl) + + Accessible.onPressAction: onClicked + ToolTip { text: i18nc("Clear play list and enqueue current track", "Play Now and Replace Play List") } diff --git a/src/qml/FileBrowserView.qml b/src/qml/FileBrowserView.qml --- a/src/qml/FileBrowserView.qml +++ b/src/qml/FileBrowserView.qml @@ -114,6 +114,9 @@ currentIndex: -1 + Accessible.role: Accessible.List + Accessible.name: proxyModel.url + model: proxyModel ScrollHelper { diff --git a/src/qml/FlatButtonWithToolTip.qml b/src/qml/FlatButtonWithToolTip.qml --- a/src/qml/FlatButtonWithToolTip.qml +++ b/src/qml/FlatButtonWithToolTip.qml @@ -48,6 +48,8 @@ border.width: 1 } + Accessible.onPressAction: onClicked + ToolTip.visible: hovered ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval ToolTip.text: flatButtonWithToolTip.action.text diff --git a/src/qml/GridBrowserDelegate.qml b/src/qml/GridBrowserDelegate.qml --- a/src/qml/GridBrowserDelegate.qml +++ b/src/qml/GridBrowserDelegate.qml @@ -43,6 +43,9 @@ Keys.onReturnPressed: open() Keys.onEnterPressed: open() + Accessible.role: Accessible.ListItem + Accessible.name: mainText + Rectangle { id: stateIndicator @@ -132,6 +135,11 @@ ToolTip.delay: 1000 ToolTip.text: i18nc("Clear play list and add whole container to play list", "Play now, replacing current playlist") + Accessible.role: Accessible.Button + Accessible.name: ToolTip.text + Accessible.description: ToolTip.text + Accessible.onPressAction: onClicked + onClicked: replaceAndPlay(databaseId, mainText) Keys.onReturnPressed: replaceAndPlay(databaseId, mainText) Keys.onEnterPressed: replaceAndPlay(databaseId, mainText) @@ -153,6 +161,11 @@ ToolTip.delay: 1000 ToolTip.text: i18nc("Add whole container to play list", "Add to playlist") + Accessible.role: Accessible.Button + Accessible.name: ToolTip.text + Accessible.description: ToolTip.text + Accessible.onPressAction: onClicked + onClicked: enqueue(databaseId, mainText) Keys.onReturnPressed: enqueue(databaseId, mainText) Keys.onEnterPressed: enqueue(databaseId, mainText) @@ -173,6 +186,11 @@ ToolTip.delay: 1000 ToolTip.text: i18nc("Open view of the container", "Open") + Accessible.role: Accessible.Button + Accessible.name: ToolTip.text + Accessible.description: ToolTip.text + Accessible.onPressAction: onClicked + onClicked: open() width: elisaTheme.delegateToolButtonSize diff --git a/src/qml/GridBrowserView.qml b/src/qml/GridBrowserView.qml --- a/src/qml/GridBrowserView.qml +++ b/src/qml/GridBrowserView.qml @@ -114,6 +114,9 @@ currentIndex: -1 + Accessible.role: Accessible.List + Accessible.name: mainTitle + TextMetrics { id: secondaryLabelSize text: 'example' diff --git a/src/qml/ListBrowserView.qml b/src/qml/ListBrowserView.qml --- a/src/qml/ListBrowserView.qml +++ b/src/qml/ListBrowserView.qml @@ -105,6 +105,10 @@ anchors.topMargin: 20 anchors.fill: parent + Accessible.role: Accessible.List + Accessible.name: mainTitle + Accessible.description: mainTitle + activeFocusOnTab: true keyNavigationEnabled: true diff --git a/src/qml/MediaAlbumTrackDelegate.qml b/src/qml/MediaAlbumTrackDelegate.qml --- a/src/qml/MediaAlbumTrackDelegate.qml +++ b/src/qml/MediaAlbumTrackDelegate.qml @@ -38,6 +38,10 @@ property alias isSelected: mediaTrack.isSelected property alias isAlternateColor: mediaTrack.isAlternateColor + Accessible.role: Accessible.ListItem + Accessible.name: title + Accessible.description: title + ColumnLayout { anchors.fill: parent diff --git a/src/qml/MediaPlayListView.qml b/src/qml/MediaPlayListView.qml --- a/src/qml/MediaPlayListView.qml +++ b/src/qml/MediaPlayListView.qml @@ -35,6 +35,9 @@ id: topItem + Accessible.role: Accessible.Pane + Accessible.name: viewTitleHeight.text + Controls1.Action { id: clearPlayList text: i18nc("Remove all tracks from play list", "Clear Playlist") @@ -136,21 +139,25 @@ Controls1.ToolButton { action: showCurrentTrack Keys.onReturnPressed: action.trigger() + Accessible.onPressAction: action.trigger() } Controls1.ToolButton { action: savePlaylist Keys.onReturnPressed: action.trigger() + Accessible.onPressAction: action.trigger() } Controls1.ToolButton { action: loadPlaylist Keys.onReturnPressed: action.trigger() + Accessible.onPressAction: action.trigger() } Controls1.ToolButton { action: clearPlayList Keys.onReturnPressed: action.trigger() + Accessible.onPressAction: action.trigger() } } @@ -228,6 +235,7 @@ Layout.fillWidth: true Layout.fillHeight: true + title: viewTitleHeight.text playListModel: elisa.mediaPlayList focus: true diff --git a/src/qml/MediaTrackDelegate.qml b/src/qml/MediaTrackDelegate.qml --- a/src/qml/MediaTrackDelegate.qml +++ b/src/qml/MediaTrackDelegate.qml @@ -47,6 +47,10 @@ signal enqueue(var databaseId, var name) signal replaceAndPlay(var databaseId, var name) + Accessible.role: Accessible.ListItem + Accessible.name: title + Accessible.description: title + Controls1.Action { id: enqueueAction text: i18nc("Enqueue current track", "Enqueue") @@ -295,6 +299,7 @@ width: elisaTheme.delegateHeight action: viewDetailsAction + Accessible.onPressAction: action.trigger() } Controls1.ToolButton { @@ -304,6 +309,7 @@ width: elisaTheme.delegateHeight action: enqueueAction + Accessible.onPressAction: action.trigger() } Controls1.ToolButton { @@ -315,6 +321,7 @@ width: elisaTheme.delegateHeight action: replaceAndPlayAction + Accessible.onPressAction: action.trigger() } } } diff --git a/src/qml/NavigationActionBar.qml b/src/qml/NavigationActionBar.qml --- a/src/qml/NavigationActionBar.qml +++ b/src/qml/NavigationActionBar.qml @@ -90,6 +90,7 @@ objectName: 'goPreviousButton' Keys.onReturnPressed: action.trigger() + Accessible.onPressAction: action.trigger() activeFocusOnTab: true focus: enableGoBack @@ -190,6 +191,7 @@ onClicked: enqueue() Keys.onReturnPressed: enqueue() + Accessible.onPressAction: onClicked Layout.leftMargin: 0 Layout.rightMargin: 0 @@ -205,6 +207,7 @@ onClicked: replaceAndPlay() Keys.onReturnPressed: replaceAndPlay() + Accessible.onPressAction: onClicked Layout.leftMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0 Layout.rightMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0 @@ -221,7 +224,8 @@ activeFocusOnTab: true onClicked: showArtist() - Keys.onReturnPressed: showArtist() + Keys.onReturnPressed: onClicked + Accessible.onPressAction: onClicked Layout.leftMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0 Layout.rightMargin: LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0 @@ -238,6 +242,7 @@ activeFocusOnTab: true Keys.onReturnPressed: action.trigger() + Accessible.onPressAction: action.trigger() Layout.alignment: Qt.AlignRight Layout.leftMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0 @@ -281,6 +286,8 @@ horizontalAlignment: TextInput.AlignLeft + Accessible.role: Accessible.EditableText + placeholderText: i18nc("Placeholder text in the filter text box", "Album name, artist, etc.") Layout.bottomMargin: 0 @@ -363,6 +370,7 @@ activeFocusOnTab: true Keys.onReturnPressed: action.trigger() + Accessible.onPressAction: action.trigger() Layout.alignment: Qt.AlignRight Layout.leftMargin: !LayoutMirroring.enabled ? elisaTheme.layoutHorizontalMargin : 0 diff --git a/src/qml/PassiveNotification.qml b/src/qml/PassiveNotification.qml --- a/src/qml/PassiveNotification.qml +++ b/src/qml/PassiveNotification.qml @@ -137,6 +137,7 @@ callBack(); } } + Accessible.onPressAction: onClicked } } layer.enabled: true diff --git a/src/qml/PlayListBasicView.qml b/src/qml/PlayListBasicView.qml --- a/src/qml/PlayListBasicView.qml +++ b/src/qml/PlayListBasicView.qml @@ -25,6 +25,7 @@ id: playListView property alias playListModel: playListModelDelegate.model + property string title signal startPlayback() signal pausePlayback() @@ -36,6 +37,9 @@ currentIndex: -1 + Accessible.role: Accessible.List + Accessible.name: title + section.property: 'albumSection' section.criteria: ViewSection.FullString section.labelPositioning: ViewSection.InlineLabels diff --git a/src/qml/PlayListEntry.qml b/src/qml/PlayListEntry.qml --- a/src/qml/PlayListEntry.qml +++ b/src/qml/PlayListEntry.qml @@ -53,6 +53,9 @@ signal removeFromPlaylist(var trackIndex) signal switchToTrack(var trackIndex) + Accessible.role: Accessible.ListItem + Accessible.name: title + ' ' + album + ' ' + artist + height: elisaTheme.playListDelegateHeight Controls1.Action { @@ -340,6 +343,8 @@ visible: opacity > 0.1 action: showInfo + Accessible.onPressAction: action.trigger() + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight } @@ -356,6 +361,8 @@ visible: opacity > 0.1 action: !(isPlaying === MediaPlayList.IsPlaying) ? playNow : pauseNow + Accessible.onPressAction: action.trigger() + Layout.alignment: Qt.AlignVCenter | Qt.AlignRight } @@ -376,6 +383,7 @@ visible: opacity > 0.1 action: removeFromPlayList + Accessible.onPressAction: action.trigger() } } diff --git a/src/qml/TopNotification.qml b/src/qml/TopNotification.qml --- a/src/qml/TopNotification.qml +++ b/src/qml/TopNotification.qml @@ -79,6 +79,7 @@ text: manager.countNotifications onClicked: topItem.isViewExpanded = !topItem.isViewExpanded + Accessible.onPressAction: onClicked } } diff --git a/src/qml/TopNotificationItem.qml b/src/qml/TopNotificationItem.qml --- a/src/qml/TopNotificationItem.qml +++ b/src/qml/TopNotificationItem.qml @@ -75,6 +75,7 @@ enableAgainMainButtonTimer.start() mainButtonClicked() } + Accessible.onPressAction: onClicked Timer { id: enableAgainMainButtonTimer @@ -98,6 +99,7 @@ enableAgainSecondaryButtonTimer.start() secondaryButtonClicked() } + Accessible.onPressAction: onClicked Timer { id: enableAgainSecondaryButtonTimer @@ -121,5 +123,6 @@ iconName: 'dialog-close' onClicked: close() + Accessible.onPressAction: onClicked } } diff --git a/src/qml/ViewSelector.qml b/src/qml/ViewSelector.qml --- a/src/qml/ViewSelector.qml +++ b/src/qml/ViewSelector.qml @@ -65,6 +65,8 @@ ListView { id: viewModeView + Accessible.role: Accessible.List + focus: true activeFocusOnTab: true keyNavigationEnabled: true diff --git a/src/qml/ViewSelectorDelegate.qml b/src/qml/ViewSelectorDelegate.qml --- a/src/qml/ViewSelectorDelegate.qml +++ b/src/qml/ViewSelectorDelegate.qml @@ -36,6 +36,10 @@ color: "transparent" } + Accessible.role: Accessible.ListItem + Accessible.description: model.display + Accessible.name: model.display + MouseArea { id: hoverArea