diff --git a/REUSE.toml b/REUSE.toml index 5efdfe80..0492bf48 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -62,3 +62,9 @@ path = "toolGenerate/**/**" precedence = "aggregate" SPDX-FileCopyrightText = "None" SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = "tests/at/spi/expected_names.yaml" +precedence = "aggregate" +SPDX-FileCopyrightText = "UnionTech Software Technology Co., Ltd." +SPDX-License-Identifier = "CC0-1.0" diff --git a/qml/AppItemMenu.qml b/qml/AppItemMenu.qml index 990dfa5e..1fa073bb 100644 --- a/qml/AppItemMenu.qml +++ b/qml/AppItemMenu.qml @@ -29,6 +29,7 @@ Loader { Menu { id: contextMenu + objectName: "ContextMenu" topMargin: isFullscreen && DesktopIntegration.dockPosition === Qt.UpArrow ? dockSpacing : 0 bottomMargin: isFullscreen && DesktopIntegration.dockPosition === Qt.DownArrow ? dockSpacing : 0 @@ -41,6 +42,7 @@ Loader { MenuItem { text: qsTr("Open") + objectName: "Open" enabled: !root.desktopId.startsWith("internal/folders/") onTriggered: { launchApp(root.desktopId) @@ -49,6 +51,7 @@ Loader { MenuSeparator {} MenuItem { id: pinToTopMenu + objectName: "PinToTopMenu" enabled: false visible: isFavoriteItem && !hideFavoriteMenu height: visible ? implicitHeight : 0 // FIXME: seems this can cause some issue @@ -59,6 +62,7 @@ Loader { } MenuItem { id: moveToTopMenu + objectName: "MoveToTopMenu" visible: !hideMoveToTopMenu enabled: visible height: visible ? implicitHeight : 0 @@ -69,6 +73,7 @@ Loader { } MenuItem { id: addOrRemoveFavMenu + objectName: "AddOrRemoveFavMenu" visible: !hideFavoriteMenu enabled: false height: visible ? implicitHeight : 0 // FIXME: same as above @@ -86,6 +91,7 @@ Loader { height: visible ? implicitHeight : 0 // FIXME: same as above } MenuItem { + objectName: "RemoveFromDesktop" enabled: !root.desktopId.startsWith("internal/folders/") text: DesktopIntegration.isOnDesktop(root.desktopId) ? qsTr("Remove from desktop") : qsTr("Send to desktop") onTriggered: { @@ -97,6 +103,7 @@ Loader { } } MenuItem { + objectName: "RemoveFromDock" enabled: !root.desktopId.startsWith("internal/") text: DesktopIntegration.isDockedApp(root.desktopId) ? qsTr("Remove from dock") : qsTr("Send to dock") onTriggered: { @@ -109,6 +116,7 @@ Loader { } MenuSeparator {} MenuItem { + objectName: "RemoveFromStartup" enabled: !root.desktopId.startsWith("internal/folders/") text: DesktopIntegration.isAutoStart(root.desktopId) ? qsTr("Remove from startup") : qsTr("Add to startup") onTriggered: { @@ -116,12 +124,14 @@ Loader { } } MenuItem { + objectName: "UseAProxy" visible: false enabled: false text: qsTr("Use a proxy") height: visible ? implicitHeight : 0 // FIXME: same as above } MenuItem { + objectName: "DisableDisplayScaling" visible: !hideDisplayScalingMenu enabled: visible && !root.desktopId.startsWith("internal/folders/") height: visible ? implicitHeight : 0 // FIXME: same as above @@ -133,6 +143,7 @@ Loader { } } MenuItem { + objectName: "Uninstall" enabled: !root.desktopId.startsWith("internal/folders/") && !DesktopIntegration.appIsCompulsoryForDesktop(root.desktopId) text: qsTr("Uninstall") onTriggered: { diff --git a/qml/DebugDialog.qml b/qml/DebugDialog.qml index 1e2dca82..33cb67ac 100644 --- a/qml/DebugDialog.qml +++ b/qml/DebugDialog.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -18,6 +18,7 @@ Column { Switch { text: "Use regular window (need restart)" + objectName: "UseRegularWindowNeedRestart" checked: DebugHelper.useRegularWindow onCheckedChanged: { DebugHelper.useRegularWindow = checked @@ -26,6 +27,7 @@ Column { Switch { text: "Avoid launch application" + objectName: "AvoidLaunchApplication" checked: DebugHelper.avoidLaunchApp onCheckedChanged: { DebugHelper.avoidLaunchApp = checked @@ -34,6 +36,7 @@ Column { Switch { text: "Avoid hide launchpad window" + objectName: "AvoidHideLaunchpadWindow" checked: DebugHelper.avoidHideWindow onCheckedChanged: { DebugHelper.avoidHideWindow = checked @@ -42,6 +45,7 @@ Column { Switch { text: "Display item's bounding rectangle" + objectName: "DisplayItemSBoundingRectangle" checked: DebugHelper.itemBoundingEnabled onCheckedChanged: { DebugHelper.itemBoundingEnabled = checked @@ -50,6 +54,7 @@ Column { ToolButton { text: "Close launchpad application" + objectName: "CloseLaunchpadApplication" onClicked: { Qt.quit() } diff --git a/qml/DummyAppItemMenu.qml b/qml/DummyAppItemMenu.qml index f44a2c34..66a9d4da 100644 --- a/qml/DummyAppItemMenu.qml +++ b/qml/DummyAppItemMenu.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -23,6 +23,7 @@ Loader { Menu { id: contextMenu + objectName: "ContextMenu_2" topMargin: isFullscreen && DesktopIntegration.dockPosition === Qt.UpArrow ? dockSpacing : 0 bottomMargin: isFullscreen && DesktopIntegration.dockPosition === Qt.DownArrow ? dockSpacing : 0 leftMargin: isFullscreen && DesktopIntegration.dockPosition === Qt.LeftArrow ? dockSpacing : 0 @@ -31,6 +32,7 @@ Loader { MenuItem { text: qsTr("Install") + objectName: "Install" onTriggered: { launchApp(root.desktopId) } @@ -38,6 +40,7 @@ Loader { MenuItem { text: qsTr("Remove") + objectName: "Remove" onTriggered: { DesktopIntegration.uninstallApp(root.desktopId) } diff --git a/qml/FolderGridViewPopup.qml b/qml/FolderGridViewPopup.qml index f021e485..9dce23a5 100644 --- a/qml/FolderGridViewPopup.qml +++ b/qml/FolderGridViewPopup.qml @@ -119,6 +119,7 @@ Popup { TextInput { id: folderNameEdit + objectName: "FolderNameEdit" Layout.fillWidth: true Layout.leftMargin: contentRoot.titleMargin - root.padding Layout.rightMargin: contentRoot.titleMargin - root.padding @@ -286,6 +287,7 @@ Popup { SwipeView { id: folderPagesView + objectName: "FolderPagesView" clip: gridViews.count > 1 anchors.fill: parent @@ -397,6 +399,7 @@ Popup { id: fullScreenGridViewContainer GridViewContainer { id: folderGridViewContainer + Accessible.role: Accessible.Pane objectName: "folderGridViewContainer" anchors.fill: parent rows: 3 @@ -480,6 +483,8 @@ Popup { id: listViewGridViewContainer Windowed.GridViewContainer { id: folderGridViewContainer + objectName: "FolderGridViewContainer_2" + Accessible.role: Accessible.Pane anchors.fill: parent rows: 3 columns: 4 @@ -685,6 +690,7 @@ Popup { Layout.alignment: Qt.AlignHCenter visible: folderPagesView.count > 1 ? true : false id: folderPageIndicator + objectName: "FolderPageIndicator" implicitHeight: isWindowedMode ? 13 : folderPageIndicator.implicitWidth count: folderPagesView.count currentIndex: folderPagesView.currentIndex diff --git a/qml/FullscreenFrame.qml b/qml/FullscreenFrame.qml index 310dc229..de86f8a6 100644 --- a/qml/FullscreenFrame.qml +++ b/qml/FullscreenFrame.qml @@ -318,6 +318,7 @@ InputEventItem { ToolButton { id: exitFullscreenBtn + objectName: "ExitFullscreenBtn" Accessible.name: "Exit fullscreen" anchors.right: fullscreenHeader.right ColorSelector.family: Palette.CrystalColor @@ -326,6 +327,7 @@ InputEventItem { ToolTip.delay: 500 ToolTip.text: qsTr("Window Mode") background: WindowedLaunchpad.ItemBackground { + Accessible.ignored: true button: exitFullscreenBtn } onClicked: { @@ -336,6 +338,7 @@ InputEventItem { PageIndicator { id: indicator + objectName: "Indicator" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter @@ -378,6 +381,7 @@ InputEventItem { ListView { id: listviewPage + objectName: "ListviewPage" anchors.fill: parent snapMode: ListView.SnapOneItem @@ -454,6 +458,7 @@ InputEventItem { GridViewContainer { id: gridViewContainer + Accessible.role: Accessible.Pane objectName: "gridViewContainer" anchors.fill: parent rows: 4 @@ -734,6 +739,8 @@ InputEventItem { GridViewContainer { id: searchResultGridViewContainer + objectName: "SearchResultGridViewContainer" + Accessible.role: Accessible.Pane anchors.fill: parent visible: searchEdit.text !== "" @@ -751,6 +758,7 @@ InputEventItem { padding: 10 interactive: true vScrollBar: ScrollBar { + objectName: "GridViewContainer_ScrollBar" visible: parent.model.count > 4 * 8 active: parent.model.count > 4 * 8 } @@ -760,6 +768,7 @@ InputEventItem { SearchEdit { id: searchEdit + objectName: "FullscreenSearchEdit" Layout.alignment: Qt.AlignHCenter implicitWidth: (parent.width / 2) > 280 ? 280 : (parent.width / 2) @@ -800,6 +809,8 @@ InputEventItem { FolderGridViewPopup { id: folderGridViewPopup + objectName: "FolderGridViewPopup" + Accessible.role: Accessible.Dialog cs: searchResultGridViewContainer.cellHeight centerPosition: Qt.point(curPointX, curPointY) diff --git a/qml/GridViewContainer.qml b/qml/GridViewContainer.qml index 6bd4972d..3806db5d 100644 --- a/qml/GridViewContainer.qml +++ b/qml/GridViewContainer.qml @@ -81,6 +81,7 @@ FocusScope { GridView { id: gridView + objectName: "GridView" ScrollBar.vertical: root.vScrollBar diff --git a/qml/IconItemDelegate.qml b/qml/IconItemDelegate.qml index 189335f9..b46c1e00 100644 --- a/qml/IconItemDelegate.qml +++ b/qml/IconItemDelegate.qml @@ -378,11 +378,14 @@ Control { ToolTip.delay: 500 ToolTip.visible: hovered && iconItemLabel.truncated background: ItemBackground { + Accessible.ignored: true radius: isWindowedMode ? 8 : 18 button: parent } } - background: DebugBounding { } + background: DebugBounding { + Accessible.ignored: true + } Keys.onSpacePressed: { if (model.itemType === ItemArrangementProxyModel.FolderItemType) { diff --git a/qml/Main.qml b/qml/Main.qml index 1276629e..097dd9be 100644 --- a/qml/Main.qml +++ b/qml/Main.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -269,7 +269,10 @@ QtObject { id: windowedFrameImpl anchors.fill: parent focus: true - sourceComponent: WindowedFrame { } + sourceComponent: WindowedFrame { + objectName: "Loader_WindowedFrame" + Accessible.role: Accessible.Pane + } Label { visible: DebugHelper.qtDebugEnabled @@ -421,6 +424,7 @@ QtObject { Item { Button { id: cancelButton + objectName: "CancelButton" text: qsTr("Cancel") onClicked: { confirmUninstallDlg.close() @@ -435,6 +439,7 @@ QtObject { Item { WarningButton { id: confirmButton + objectName: "ConfirmButton" text: qsTr("Confirm") onClicked: { DesktopIntegration.uninstallApp(confirmUninstallDlg.appId) diff --git a/qml/windowed/AlphabetCategoryPopup.qml b/qml/windowed/AlphabetCategoryPopup.qml index 2e04b90b..49e21447 100644 --- a/qml/windowed/AlphabetCategoryPopup.qml +++ b/qml/windowed/AlphabetCategoryPopup.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -84,6 +84,8 @@ Popup { Windowed.GridViewContainer { id: alphabetCategoryContainer + objectName: "AlphabetCategoryContainer" + Accessible.role: Accessible.Pane anchors.centerIn: parent diff --git a/qml/windowed/AnalysisView.qml b/qml/windowed/AnalysisView.qml index 89978b0f..30049451 100644 --- a/qml/windowed/AnalysisView.qml +++ b/qml/windowed/AnalysisView.qml @@ -34,6 +34,8 @@ Control { FrequentlyUsedView { id: frequentlyUsedView + objectName: "FrequentlyUsedView" + Accessible.role: Accessible.Pane model: freqUsedModel visible: count > 0 maxCount: recentlyInstalledView.visible ? 12 : 16 @@ -42,6 +44,8 @@ Control { RecentlyInstalledView { id: recentlyInstalledView + objectName: "RecentlyInstalledView" + Accessible.role: Accessible.Pane model: RecentlyInstalledProxyModel { sourceModel: AppsModel installedTimeRole: AppsModel.InstalledTimeRole @@ -58,5 +62,7 @@ Control { } } - background: DebugBounding { } + background: DebugBounding { + Accessible.ignored: true + } } diff --git a/qml/windowed/AppList.qml b/qml/windowed/AppList.qml index a2e5d65a..3ba4bfd3 100644 --- a/qml/windowed/AppList.qml +++ b/qml/windowed/AppList.qml @@ -46,6 +46,8 @@ ColumnLayout { AppListView { id: categoryView + objectName: "CategoryListView" + Accessible.role: Accessible.Pane anchors.fill: viewContainer visible: !isFreeSort @@ -55,6 +57,8 @@ ColumnLayout { FreeSortListView { id: freeSortView + objectName: "FreeSortListView" + Accessible.role: Accessible.Pane anchors.fill: viewContainer visible: isFreeSort diff --git a/qml/windowed/AppListView.qml b/qml/windowed/AppListView.qml index d9159f41..3f409972 100644 --- a/qml/windowed/AppListView.qml +++ b/qml/windowed/AppListView.qml @@ -98,6 +98,7 @@ FocusScope { height: headingBtn.height ToolButton { id: headingBtn + objectName: "HeadingBtn" enabled: true ColorSelector.disabled: false @@ -129,6 +130,7 @@ FocusScope { } background: ItemBackground { + Accessible.ignored: true button: headingBtn } @@ -169,6 +171,7 @@ FocusScope { height: itemDelegate.height ItemDelegate { id: itemDelegate + objectName: "ItemDelegate_2_" + index anchors { left: parent.left right: parent.right @@ -272,6 +275,7 @@ FocusScope { } } background: ItemBackground { + Accessible.ignored: true implicitWidth: DStyle.Style.itemDelegate.width implicitHeight: Helper.windowed.listItemHeight button: itemDelegate @@ -291,6 +295,7 @@ FocusScope { Menu { id: ddeCategoryMenu + objectName: "DdeCategoryMenu" width: 150 modal: true closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent @@ -300,6 +305,7 @@ FocusScope { model: ddeCategoryMenu.existingSections delegate: MenuItem { id: menuItem + objectName: "MenuItem_" + index text: getCategoryName(modelData) textColor: DStyle.Style.menu.itemText font: DTK.fontManager.t6 @@ -359,6 +365,7 @@ FocusScope { ListView { id: listView + objectName: "ListView_2" anchors.fill: parent highlightFollowsCurrentItem: true @@ -407,7 +414,9 @@ FocusScope { model: delegateCategorizedModel - ScrollBar.vertical: ScrollBar { } + ScrollBar.vertical: ScrollBar { + objectName: "ListView_ScrollBar_2" + } Keys.onPressed: { if (CategorizedSortProxyModel.categoryType === CategorizedSortProxyModel.Alphabetary @@ -419,6 +428,8 @@ FocusScope { AlphabetCategoryPopup { id: alphabetCategoryPopup + objectName: "AlphabetCategoryPopup" + Accessible.role: Accessible.Dialog onCategoryClicked: { scrollToAlphabetCategory(character) diff --git a/qml/windowed/BottomBar.qml b/qml/windowed/BottomBar.qml index 77cf0f07..3059dff2 100644 --- a/qml/windowed/BottomBar.qml +++ b/qml/windowed/BottomBar.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // // SPDX-License-Identifier: GPL-3.0-or-later @@ -25,8 +25,10 @@ Control { contentItem: RowLayout { ToolButton { id: shutdownBtn + objectName: "ShutdownBtn" icon.name: "shutdown" background: ItemBackground { + Accessible.ignored: true button: shutdownBtn } ToolTip.visible: hovered @@ -51,6 +53,7 @@ Control { contentItem: SearchEdit { id: searchEdit + objectName: "WindowedSearchEdit" padding: 1 placeholder: qsTr("Search") property Palette textColor: DStyle.Style.button.text @@ -95,8 +98,10 @@ Control { ToolButton { id: fullscreenBtn + objectName: "FullscreenBtn" icon.name: "launcher_fullscreen" background: ItemBackground { + Accessible.ignored: true button: fullscreenBtn } ToolTip.visible: hovered @@ -112,5 +117,7 @@ Control { } } - background: DebugBounding { } + background: DebugBounding { + Accessible.ignored: true + } } diff --git a/qml/windowed/FreeSortListView.qml b/qml/windowed/FreeSortListView.qml index 3bb6a2a4..3569c4a8 100644 --- a/qml/windowed/FreeSortListView.qml +++ b/qml/windowed/FreeSortListView.qml @@ -53,6 +53,7 @@ Item { ListView { id: listView + objectName: "ListView" anchors.fill: parent highlightFollowsCurrentItem: true @@ -88,7 +89,9 @@ Item { } } - ScrollBar.vertical: ScrollBar { } + ScrollBar.vertical: ScrollBar { + objectName: "ListView_ScrollBar" + } Timer { id: listViewDragScroller @@ -260,6 +263,7 @@ Item { ItemDelegate { id: itemDelegate + objectName: "ItemDelegate_" + index text: model.display.startsWith("internal/category/") ? getCategoryName(model.display.substring(18)) : model.display checkable: false icon.name: itemType === ItemArrangementProxyModel.FolderItemType ? "folder" : iconName @@ -325,6 +329,7 @@ Item { background: ItemBackground { id: bg + Accessible.ignored: true implicitWidth: DStyle.Style.itemDelegate.width implicitHeight: Helper.windowed.listItemHeight button: itemDelegate diff --git a/qml/windowed/FrequentlyUsedView.qml b/qml/windowed/FrequentlyUsedView.qml index ce16a9b2..42718d47 100644 --- a/qml/windowed/FrequentlyUsedView.qml +++ b/qml/windowed/FrequentlyUsedView.qml @@ -35,6 +35,8 @@ Control { GridViewContainer { id: frequentlyUsedViewContainer + objectName: "FrequentlyUsedViewContainer" + Accessible.role: Accessible.Pane KeyNavigation.tab: control.nextKeyTabTarget Layout.alignment: Qt.AlignRight @@ -68,5 +70,7 @@ Control { } } - background: DebugBounding { } + background: DebugBounding { + Accessible.ignored: true + } } diff --git a/qml/windowed/GridViewContainer.qml b/qml/windowed/GridViewContainer.qml index ed274eb1..314d80f5 100644 --- a/qml/windowed/GridViewContainer.qml +++ b/qml/windowed/GridViewContainer.qml @@ -56,6 +56,7 @@ FocusScope { GridView { id: gridView + objectName: "GridView_2" width: root.cellWidth * columns + paddingColumns * Math.max(0, columns - 1) + paddingColumns height: root.cellHeight * rows + paddingRows * Math.max(0, rows - 1) + paddingRows ScrollBar.vertical: root.vScrollBar diff --git a/qml/windowed/IconItemDelegate.qml b/qml/windowed/IconItemDelegate.qml index d5fa0ea7..b612a146 100644 --- a/qml/windowed/IconItemDelegate.qml +++ b/qml/windowed/IconItemDelegate.qml @@ -127,11 +127,14 @@ Control { ToolTip.delay: 500 ToolTip.visible: hovered && iconItemLabel.truncated background: ItemBackground { + Accessible.ignored: true radius: 8 button: iconButton } } - background: DebugBounding { } + background: DebugBounding { + Accessible.ignored: true + } Keys.onSpacePressed: { root.itemClicked() diff --git a/qml/windowed/RecentlyInstalledView.qml b/qml/windowed/RecentlyInstalledView.qml index 5433252a..e2753847 100644 --- a/qml/windowed/RecentlyInstalledView.qml +++ b/qml/windowed/RecentlyInstalledView.qml @@ -33,6 +33,8 @@ Control { GridViewContainer { id: recentlyInstalledViewContainer + objectName: "RecentlyInstalledViewContainer" + Accessible.role: Accessible.Pane KeyNavigation.tab: nextKeyTabTarget Layout.alignment: Qt.AlignRight @@ -64,5 +66,7 @@ Control { } } - background: DebugBounding { } + background: DebugBounding { + Accessible.ignored: true + } } diff --git a/qml/windowed/SearchResultView.qml b/qml/windowed/SearchResultView.qml index 68ebf6b7..035102d5 100644 --- a/qml/windowed/SearchResultView.qml +++ b/qml/windowed/SearchResultView.qml @@ -53,6 +53,8 @@ Control { GridViewContainer { id: searchResultViewContainer + objectName: "SearchResultViewContainer" + Accessible.role: Accessible.Pane KeyNavigation.tab: nextKeyTabTarget Layout.alignment: Qt.AlignRight @@ -69,6 +71,7 @@ Control { vScrollBar: ScrollBar { id: vScrollBar + objectName: "VScrollBar" visible: parent.model.count > 4 * 4 active: parent.model.count > 4 * 4 } @@ -100,5 +103,7 @@ Control { } } - background: DebugBounding { } + background: DebugBounding { + Accessible.ignored: true + } } diff --git a/qml/windowed/SideBar.qml b/qml/windowed/SideBar.qml index 5d3efb1d..f95d1cc5 100644 --- a/qml/windowed/SideBar.qml +++ b/qml/windowed/SideBar.qml @@ -35,9 +35,11 @@ ColumnLayout { id: categorizedCom D.Menu { id: categorizedMenu + objectName: "CategorizedMenu" D.MenuItem { text: qsTr("Free sorting") + objectName: "FreeSorting" icon.name: categorizedIcon("freeSort") display: D.IconLabel.IconBesideText checked: isFreeSort @@ -52,6 +54,7 @@ ColumnLayout { D.MenuItem { text: qsTr("Sort by category") + objectName: "SortByCategory" icon.name: categorizedIcon(CategorizedSortProxyModel.DDECategory) display: D.IconLabel.IconBesideText checked: CategorizedSortProxyModel.categoryType === CategorizedSortProxyModel.DDECategory @@ -64,6 +67,7 @@ ColumnLayout { D.MenuItem { text: qsTr("Sort by name") + objectName: "SortByName" icon.name: categorizedIcon(CategorizedSortProxyModel.Alphabetary) display: D.IconLabel.IconBesideText checked: CategorizedSortProxyModel.categoryType === CategorizedSortProxyModel.Alphabetary @@ -87,6 +91,7 @@ ColumnLayout { D.ToolButton { id: title + objectName: "Title" Layout.alignment: Qt.AlignCenter KeyNavigation.down: computer @@ -124,6 +129,7 @@ ColumnLayout { } background: ItemBackground { + Accessible.ignored: true button: title } @@ -155,6 +161,7 @@ ColumnLayout { } } background: ItemBackground { + Accessible.ignored: true button: btn } } diff --git a/qml/windowed/WindowedFrame.qml b/qml/windowed/WindowedFrame.qml index 15049d2b..203b269b 100644 --- a/qml/windowed/WindowedFrame.qml +++ b/qml/windowed/WindowedFrame.qml @@ -82,6 +82,8 @@ InputEventItem { SideBar { id: sideBar + objectName: "SideBar" + Accessible.role: Accessible.Pane anchors.left: parent.left anchors.top: parent.top anchors.bottom: parent.bottom @@ -129,6 +131,8 @@ InputEventItem { } AppList { id: appList + objectName: "AppList" + Accessible.role: Accessible.Pane Layout.preferredWidth: 220 Layout.fillHeight: true nextKeyTabTarget: sideBar.keyTabTarget @@ -140,12 +144,16 @@ InputEventItem { Component { id: analysisViewCom AnalysisView { + objectName: "Component_AnalysisView" + Accessible.role: Accessible.Pane nextKeyTabTarget: appList.keyTabTarget } } Component { id: searchResultViewCom SearchResultView { + objectName: "Component_SearchResultView" + Accessible.role: Accessible.Pane nextKeyTabTarget: appList.keyTabTarget } } @@ -161,6 +169,8 @@ InputEventItem { BottomBar { id: bottomBar + objectName: "BottomBar" + Accessible.role: Accessible.ToolBar anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom @@ -192,6 +202,8 @@ InputEventItem { FolderGridViewPopup { id: folderGridViewPopup + objectName: "FolderGridViewPopup_2" + Accessible.role: Accessible.Dialog // 物理像素对齐,确保在各种缩放比例下边缘都能对齐到整数物理像素 width: Math.round(370 * Screen.devicePixelRatio) / Screen.devicePixelRatio height: Math.round(330 * Screen.devicePixelRatio) / Screen.devicePixelRatio diff --git a/shell-launcher-applet/package/launcheritem.qml b/shell-launcher-applet/package/launcheritem.qml index b14ba723..8f42ae12 100644 --- a/shell-launcher-applet/package/launcheritem.qml +++ b/shell-launcher-applet/package/launcheritem.qml @@ -241,7 +241,10 @@ AppletItem { Loader { anchors.fill: parent focus: true - sourceComponent: FullscreenFrame {} + sourceComponent: FullscreenFrame { + objectName: "Loader_FullscreenFrame" + Accessible.role: Accessible.Pane + } Label { visible: DebugHelper.qtDebugEnabled @@ -278,6 +281,8 @@ AppletItem { width, height) WindowedFrame { + objectName: "Launcheritem_WindowedFrame" + Accessible.role: Accessible.Pane anchors.fill: parent } @@ -340,6 +345,7 @@ AppletItem { Button { id: cancelButton + objectName: "CancelButton_2" Layout.fillWidth: true text: qsTr("Cancel") onClicked: { @@ -348,6 +354,7 @@ AppletItem { } WarningButton { id: confirmButton + objectName: "ConfirmButton_2" Layout.fillWidth: true text: qsTr("Confirm") onClicked: { diff --git a/tests/at/spi/expected_names.yaml b/tests/at/spi/expected_names.yaml new file mode 100644 index 00000000..c1f923a9 --- /dev/null +++ b/tests/at/spi/expected_names.yaml @@ -0,0 +1,480 @@ +version: '1.0' +widgets: [] +qml_elements: +- element_type: Menu + id: contextMenu + accessible_id: ContextMenu + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Component + line: 30 +- element_type: MenuItem + id: '' + accessible_id: Open + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 43 +- element_type: MenuItem + id: pinToTopMenu + accessible_id: PinToTopMenu + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 52 +- element_type: MenuItem + id: moveToTopMenu + accessible_id: MoveToTopMenu + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 63 +- element_type: MenuItem + id: addOrRemoveFavMenu + accessible_id: AddOrRemoveFavMenu + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 74 +- element_type: MenuItem + id: '' + accessible_id: RemoveFromDesktop + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 93 +- element_type: MenuItem + id: '' + accessible_id: RemoveFromDock + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 105 +- element_type: MenuItem + id: '' + accessible_id: RemoveFromStartup + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 118 +- element_type: MenuItem + id: '' + accessible_id: UseAProxy + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 126 +- element_type: MenuItem + id: '' + accessible_id: DisableDisplayScaling + accessible_role: '' + source_file: qml/AppItemMenu.qml + parent_type: Menu + line: 133 +- element_type: Switch + id: '' + accessible_id: UseRegularWindowNeedRestart + accessible_role: '' + source_file: qml/DebugDialog.qml + parent_type: '' + line: 19 +- element_type: Switch + id: '' + accessible_id: AvoidLaunchApplication + accessible_role: '' + source_file: qml/DebugDialog.qml + parent_type: '' + line: 28 +- element_type: Switch + id: '' + accessible_id: AvoidHideLaunchpadWindow + accessible_role: '' + source_file: qml/DebugDialog.qml + parent_type: '' + line: 37 +- element_type: Switch + id: '' + accessible_id: DisplayItemSBoundingRectangle + accessible_role: '' + source_file: qml/DebugDialog.qml + parent_type: '' + line: 46 +- element_type: ToolButton + id: '' + accessible_id: CloseLaunchpadApplication + accessible_role: '' + source_file: qml/DebugDialog.qml + parent_type: '' + line: 55 +- element_type: Menu + id: contextMenu + accessible_id: ContextMenu_2 + accessible_role: '' + source_file: qml/DummyAppItemMenu.qml + parent_type: Component + line: 24 +- element_type: MenuItem + id: '' + accessible_id: Install + accessible_role: '' + source_file: qml/DummyAppItemMenu.qml + parent_type: Menu + line: 33 +- element_type: MenuItem + id: '' + accessible_id: Remove + accessible_role: '' + source_file: qml/DummyAppItemMenu.qml + parent_type: Menu + line: 41 +- element_type: TextInput + id: folderNameEdit + accessible_id: FolderNameEdit + accessible_role: '' + source_file: qml/FolderGridViewPopup.qml + parent_type: Loader + line: 120 +- element_type: GridViewContainer + id: folderGridViewContainer + accessible_id: folderGridViewContainer + accessible_role: Accessible.Pane + source_file: qml/FolderGridViewPopup.qml + parent_type: Component + line: 400 +- element_type: GridViewContainer + id: folderGridViewContainer + accessible_id: FolderGridViewContainer_2 + accessible_role: Accessible.Pane + source_file: qml/FolderGridViewPopup.qml + parent_type: Component + line: 485 +- element_type: PageIndicator + id: folderPageIndicator + accessible_id: FolderPageIndicator + accessible_role: '' + source_file: qml/FolderGridViewPopup.qml + parent_type: Loader + line: 690 +- element_type: ToolButton + id: exitFullscreenBtn + accessible_id: ExitFullscreenBtn + accessible_role: '' + source_file: qml/FullscreenFrame.qml + parent_type: '' + line: 319 +- element_type: PageIndicator + id: indicator + accessible_id: Indicator + accessible_role: '' + source_file: qml/FullscreenFrame.qml + parent_type: '' + line: 339 +- element_type: ListView + id: listviewPage + accessible_id: ListviewPage + accessible_role: '' + source_file: qml/FullscreenFrame.qml + parent_type: '' + line: 382 +- element_type: GridViewContainer + id: gridViewContainer + accessible_id: gridViewContainer + accessible_role: Accessible.Pane + source_file: qml/FullscreenFrame.qml + parent_type: ListView + line: 459 +- element_type: GridViewContainer + id: searchResultGridViewContainer + accessible_id: SearchResultGridViewContainer + accessible_role: Accessible.Pane + source_file: qml/FullscreenFrame.qml + parent_type: '' + line: 741 +- element_type: ScrollBar + id: '' + accessible_id: GridViewContainer_ScrollBar + accessible_role: '' + source_file: qml/FullscreenFrame.qml + parent_type: GridViewContainer + line: 761 +- element_type: FolderGridViewPopup + id: folderGridViewPopup + accessible_id: FolderGridViewPopup + accessible_role: Accessible.Dialog + source_file: qml/FullscreenFrame.qml + parent_type: '' + line: 811 +- element_type: GridView + id: gridView + accessible_id: GridView + accessible_role: '' + source_file: qml/GridViewContainer.qml + parent_type: '' + line: 82 +- element_type: WindowedFrame + id: '' + accessible_id: Loader_WindowedFrame + accessible_role: Accessible.Pane + source_file: qml/Main.qml + parent_type: Loader + line: 272 +- element_type: Button + id: cancelButton + accessible_id: CancelButton + accessible_role: '' + source_file: qml/Main.qml + parent_type: '' + line: 425 +- element_type: GridViewContainer + id: alphabetCategoryContainer + accessible_id: AlphabetCategoryContainer + accessible_role: Accessible.Pane + source_file: qml/windowed/AlphabetCategoryPopup.qml + parent_type: '' + line: 85 +- element_type: FrequentlyUsedView + id: frequentlyUsedView + accessible_id: FrequentlyUsedView + accessible_role: Accessible.Pane + source_file: qml/windowed/AnalysisView.qml + parent_type: '' + line: 35 +- element_type: RecentlyInstalledView + id: recentlyInstalledView + accessible_id: RecentlyInstalledView + accessible_role: Accessible.Pane + source_file: qml/windowed/AnalysisView.qml + parent_type: '' + line: 45 +- element_type: ColumnLayout + id: '' + accessible_id: CategoryListView + accessible_role: Accessible.Pane + source_file: qml/windowed/AppList.qml + parent_type: '' + line: 17 +- element_type: FreeSortListView + id: freeSortView + accessible_id: FreeSortListView + accessible_role: Accessible.Pane + source_file: qml/windowed/AppList.qml + parent_type: '' + line: 58 +- element_type: ToolButton + id: headingBtn + accessible_id: HeadingBtn + accessible_role: '' + source_file: qml/windowed/AppListView.qml + parent_type: Component + line: 99 +- element_type: ItemDelegate + id: itemDelegate + accessible_id: ItemDelegate_2_ + accessible_role: '' + source_file: qml/windowed/AppListView.qml + parent_type: '' + line: 172 +- element_type: Menu + id: ddeCategoryMenu + accessible_id: DdeCategoryMenu + accessible_role: '' + source_file: qml/windowed/AppListView.qml + parent_type: '' + line: 296 +- element_type: MenuItem + id: menuItem + accessible_id: MenuItem_ + accessible_role: '' + source_file: qml/windowed/AppListView.qml + parent_type: Repeater + line: 306 +- element_type: ListView + id: listView + accessible_id: ListView_2 + accessible_role: '' + source_file: qml/windowed/AppListView.qml + parent_type: '' + line: 366 +- element_type: ScrollBar + id: '' + accessible_id: ListView_ScrollBar_2 + accessible_role: '' + source_file: qml/windowed/AppListView.qml + parent_type: ListView + line: 417 +- element_type: AlphabetCategoryPopup + id: alphabetCategoryPopup + accessible_id: AlphabetCategoryPopup + accessible_role: Accessible.Dialog + source_file: qml/windowed/AppListView.qml + parent_type: ListView + line: 429 +- element_type: ToolButton + id: shutdownBtn + accessible_id: ShutdownBtn + accessible_role: '' + source_file: qml/windowed/BottomBar.qml + parent_type: '' + line: 26 +- element_type: ToolButton + id: fullscreenBtn + accessible_id: FullscreenBtn + accessible_role: '' + source_file: qml/windowed/BottomBar.qml + parent_type: '' + line: 99 +- element_type: ListView + id: listView + accessible_id: ListView + accessible_role: '' + source_file: qml/windowed/FreeSortListView.qml + parent_type: '' + line: 54 +- element_type: ScrollBar + id: '' + accessible_id: ListView_ScrollBar + accessible_role: '' + source_file: qml/windowed/FreeSortListView.qml + parent_type: ListView + line: 92 +- element_type: ItemDelegate + id: itemDelegate + accessible_id: ItemDelegate_ + accessible_role: '' + source_file: qml/windowed/FreeSortListView.qml + parent_type: ListView + line: 264 +- element_type: GridViewContainer + id: frequentlyUsedViewContainer + accessible_id: FrequentlyUsedViewContainer + accessible_role: Accessible.Pane + source_file: qml/windowed/FrequentlyUsedView.qml + parent_type: '' + line: 36 +- element_type: GridView + id: gridView + accessible_id: GridView_2 + accessible_role: '' + source_file: qml/windowed/GridViewContainer.qml + parent_type: '' + line: 57 +- element_type: GridViewContainer + id: recentlyInstalledViewContainer + accessible_id: RecentlyInstalledViewContainer + accessible_role: Accessible.Pane + source_file: qml/windowed/RecentlyInstalledView.qml + parent_type: '' + line: 34 +- element_type: GridViewContainer + id: searchResultViewContainer + accessible_id: SearchResultViewContainer + accessible_role: Accessible.Pane + source_file: qml/windowed/SearchResultView.qml + parent_type: '' + line: 54 +- element_type: ScrollBar + id: vScrollBar + accessible_id: VScrollBar + accessible_role: '' + source_file: qml/windowed/SearchResultView.qml + parent_type: GridViewContainer + line: 72 +- element_type: Menu + id: categorizedMenu + accessible_id: CategorizedMenu + accessible_role: '' + source_file: qml/windowed/SideBar.qml + parent_type: Component + line: 36 +- element_type: MenuItem + id: '' + accessible_id: FreeSorting + accessible_role: '' + source_file: qml/windowed/SideBar.qml + parent_type: Menu + line: 40 +- element_type: MenuItem + id: '' + accessible_id: SortByCategory + accessible_role: '' + source_file: qml/windowed/SideBar.qml + parent_type: Menu + line: 55 +- element_type: MenuItem + id: '' + accessible_id: SortByName + accessible_role: '' + source_file: qml/windowed/SideBar.qml + parent_type: Menu + line: 68 +- element_type: ToolButton + id: title + accessible_id: Title + accessible_role: '' + source_file: qml/windowed/SideBar.qml + parent_type: '' + line: 92 +- element_type: SideBar + id: sideBar + accessible_id: SideBar + accessible_role: Accessible.Pane + source_file: qml/windowed/WindowedFrame.qml + parent_type: '' + line: 83 +- element_type: AppList + id: appList + accessible_id: AppList + accessible_role: Accessible.Pane + source_file: qml/windowed/WindowedFrame.qml + parent_type: '' + line: 132 +- element_type: AnalysisView + id: '' + accessible_id: Component_AnalysisView + accessible_role: Accessible.Pane + source_file: qml/windowed/WindowedFrame.qml + parent_type: Component + line: 146 +- element_type: SearchResultView + id: '' + accessible_id: Component_SearchResultView + accessible_role: Accessible.Pane + source_file: qml/windowed/WindowedFrame.qml + parent_type: Component + line: 154 +- element_type: BottomBar + id: bottomBar + accessible_id: BottomBar + accessible_role: Accessible.ToolBar + source_file: qml/windowed/WindowedFrame.qml + parent_type: '' + line: 170 +- element_type: FolderGridViewPopup + id: folderGridViewPopup + accessible_id: FolderGridViewPopup_2 + accessible_role: Accessible.Dialog + source_file: qml/windowed/WindowedFrame.qml + parent_type: '' + line: 203 +- element_type: FullscreenFrame + id: '' + accessible_id: Loader_FullscreenFrame + accessible_role: Accessible.Pane + source_file: shell-launcher-applet/package/launcheritem.qml + parent_type: Loader + line: 244 +- element_type: WindowedFrame + id: '' + accessible_id: Launcheritem_WindowedFrame + accessible_role: Accessible.Pane + source_file: shell-launcher-applet/package/launcheritem.qml + parent_type: '' + line: 283 +- element_type: Button + id: cancelButton + accessible_id: CancelButton_2 + accessible_role: '' + source_file: shell-launcher-applet/package/launcheritem.qml + parent_type: '' + line: 346 +transient_elements: []