Accessible info must have the same role as the item that completes the text of this info
This commit is contained in:
parent
134a182f22
commit
356a1f484d
9 changed files with 26 additions and 14 deletions
|
@ -38,16 +38,16 @@ Column {
|
|||
}
|
||||
|
||||
function resetFocusOnInfo() {
|
||||
accessibleInfo.focused = false
|
||||
accessibleInfo.ignored = true
|
||||
accessibleInfo.focused = false
|
||||
}
|
||||
|
||||
AccessibleItem {
|
||||
id: accessibleInfo
|
||||
accessibleParent: root.navigationPanel.accessible
|
||||
visualItem: root
|
||||
role: MUAccessible.Information
|
||||
name: titleLabel.text + ". " + view.generalInfo + root.activeButtonName + " " + qsTrc("global", "Button")
|
||||
role: MUAccessible.Button
|
||||
name: titleLabel.text + ". " + view.generalInfo + root.activeButtonName
|
||||
}
|
||||
|
||||
StyledTextLabel {
|
||||
|
|
|
@ -57,6 +57,7 @@ FocusScope {
|
|||
accountInfo.readInfo()
|
||||
} else {
|
||||
accountInfo.resetFocusOnInfo()
|
||||
accountInfoButton.accessible.ignored = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,6 +117,13 @@ FocusScope {
|
|||
navigation.name: "AccountInfo"
|
||||
navigation.panel: navPanel
|
||||
navigation.column: 1
|
||||
navigation.accessible.ignored: true
|
||||
navigation.onActiveChanged: {
|
||||
if (!navigation.active) {
|
||||
accessible.ignored = false
|
||||
accountInfo.resetFocusOnInfo()
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
api.launcher.openUrl(root.profileUrl)
|
||||
|
|
|
@ -39,10 +39,12 @@ Row {
|
|||
spacing: 67
|
||||
|
||||
function readInfo() {
|
||||
accessibleInfo.ignored = false
|
||||
accessibleInfo.focused = true
|
||||
}
|
||||
|
||||
function resetFocusOnInfo() {
|
||||
accessibleInfo.ignored = true
|
||||
accessibleInfo.focused = false
|
||||
}
|
||||
|
||||
|
@ -50,8 +52,8 @@ Row {
|
|||
id: accessibleInfo
|
||||
accessibleParent: root.navigationPanel.accessible
|
||||
visualItem: root
|
||||
role: MUAccessible.Information
|
||||
name: root.userName + ". " + profileLinkLabel.text + " " + profileLink.text + ". " + root.activeButtonName + " " + qsTrc("global", "Button")
|
||||
role: MUAccessible.Button
|
||||
name: root.userName + ". " + profileLinkLabel.text + " " + profileLink.text + ". " + root.activeButtonName
|
||||
}
|
||||
|
||||
AccountAvatar {
|
||||
|
|
|
@ -59,6 +59,7 @@ FocusScope {
|
|||
description.readInfo()
|
||||
} else {
|
||||
description.resetFocusOnInfo()
|
||||
createNewAccount.accessible.ignored = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -150,7 +151,7 @@ FocusScope {
|
|||
navigation.accessible.ignored: true
|
||||
navigation.onActiveChanged: {
|
||||
if (!navigation.active) {
|
||||
navigation.accessible.ignored = false
|
||||
accessible.ignored = false
|
||||
description.resetFocusOnInfo()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,8 +103,8 @@ RowLayout {
|
|||
id: accessibleInfo
|
||||
accessibleParent: navPanel.accessible
|
||||
visualItem: root
|
||||
role: MUAccessible.Information
|
||||
name: root.title + " " + root.text + " " + root.firstFocusBtn().text + " " + qsTrc("global", "Button")
|
||||
role: MUAccessible.Button
|
||||
name: root.title + " " + root.text + " " + root.firstFocusBtn().text
|
||||
}
|
||||
|
||||
spacing: 27
|
||||
|
|
|
@ -86,7 +86,7 @@ PopupPanel {
|
|||
id: accessibleInfo
|
||||
accessibleParent: root.accessible
|
||||
visualItem: root
|
||||
role: MUAccessible.Information
|
||||
role: MUAccessible.Button
|
||||
name: {
|
||||
var text = root.title + "."
|
||||
|
||||
|
@ -96,7 +96,7 @@ PopupPanel {
|
|||
}
|
||||
}
|
||||
|
||||
text += root.description + ". " + root.mainButton.text + " " + qsTrc("global", "Button")
|
||||
text += root.description + ". " + root.mainButton.text
|
||||
|
||||
return text
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ FocusScope {
|
|||
} else {
|
||||
accessibleInfo.ignored = true
|
||||
accessibleInfo.focused = false
|
||||
openMoreInfoButton.accessible.ignored = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -92,7 +93,7 @@ FocusScope {
|
|||
id: accessibleInfo
|
||||
accessibleParent: root.navigation.accessible
|
||||
visualItem: authorInfo
|
||||
role: MUAccessible.Information
|
||||
role: MUAccessible.Button
|
||||
name: {
|
||||
var template = "%1 %2. %3. %4. %5"
|
||||
|
||||
|
@ -100,7 +101,7 @@ FocusScope {
|
|||
.arg(root.authorName)
|
||||
.arg(root.authorPosition)
|
||||
.arg(root.authorDescription)
|
||||
.arg(openMoreInfoButton.text) + " " + qsTrc("global", "Button")
|
||||
.arg(openMoreInfoButton.text)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ class NotationPaintView : public QQuickPaintedItem, public IControlledView, publ
|
|||
|
||||
public:
|
||||
explicit NotationPaintView(QQuickItem* parent = nullptr);
|
||||
~NotationPaintView();
|
||||
~NotationPaintView() override;
|
||||
|
||||
Q_INVOKABLE void load();
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ Column {
|
|||
id: accessibleInfo
|
||||
accessibleParent: root.navigationPanel.accessible
|
||||
visualItem: root
|
||||
role: MUAccessible.Information
|
||||
role: MUAccessible.ListItem
|
||||
name: descriptionLabel.text + " " + root.firstWorkspaceTitle
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue