[nautilus/wip/corey/a11y] general: Set labelled-by for view cells




commit c9c1bf7f66665b600af2a8b9871ab957305d1510
Author: Corey Berla <corey berla me>
Date:   Tue Aug 30 12:01:26 2022 -0700

    general: Set labelled-by for view cells
    
    In gtk4, we need to set labelled-by to help a11y programs know what
    it currently selected.

 src/resources/ui/nautilus-grid-cell.ui | 3 +++
 src/resources/ui/nautilus-name-cell.ui | 3 +++
 2 files changed, 6 insertions(+)
---
diff --git a/src/resources/ui/nautilus-grid-cell.ui b/src/resources/ui/nautilus-grid-cell.ui
index 2ca1f2755..cfc0ced89 100644
--- a/src/resources/ui/nautilus-grid-cell.ui
+++ b/src/resources/ui/nautilus-grid-cell.ui
@@ -3,6 +3,9 @@
   <requires lib="gtk" version="4.0"/>
   <template class="NautilusGridCell" parent="NautilusViewCell">
     <property name="valign">start</property>
+    <accessibility>
+      <relation name="labelled-by">label</relation>
+    </accessibility>
     <child>
       <object class="AdwClamp">
         <property name="maximum-size">0</property>
diff --git a/src/resources/ui/nautilus-name-cell.ui b/src/resources/ui/nautilus-name-cell.ui
index f2105fb55..246aa3ab2 100644
--- a/src/resources/ui/nautilus-name-cell.ui
+++ b/src/resources/ui/nautilus-name-cell.ui
@@ -2,6 +2,9 @@
 <interface>
   <requires lib="gtk" version="4.0"/>
   <template class="NautilusNameCell" parent="NautilusViewCell">
+    <accessibility>
+      <relation name="labelled-by">label</relation>
+    </accessibility>
     <child>
       <object class="GtkBox">
         <property name="spacing">6</property>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]