Originally the screen reader wasn't reading the text of the label within the popover. It read when we set label.selectable = True. That had the side-effect of making the label have the visual look of a selectable label (as expected). This hack unsets the selectable state of the popover when it is visible, but that still allows the screen reader to read the label. Fixes #2508
34 lines
1.4 KiB
XML
34 lines
1.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<template class="CcListRowInfoButton" parent="GtkWidget">
|
|
<child>
|
|
<object class="GtkMenuButton" id="button">
|
|
<property name="icon-name">info-symbolic</property>
|
|
<style>
|
|
<class name="flat"/>
|
|
</style>
|
|
<accessibility>
|
|
<property name="label" translatable="yes">More information</property>
|
|
</accessibility>
|
|
<property name="popover">
|
|
<object class="GtkPopover" id="popover">
|
|
<child>
|
|
<object class="GtkLabel" id="label">
|
|
<property name="halign">center</property>
|
|
<property name="margin-bottom">6</property>
|
|
<property name="margin-end">6</property>
|
|
<property name="margin-start">6</property>
|
|
<property name="margin-top">6</property>
|
|
<property name="max-width-chars">50</property>
|
|
<property name="valign">center</property>
|
|
<property name="wrap">True</property>
|
|
<!-- This is a hack to make the screen reader read the text of the label. See issue #2508 -->
|
|
<property name="selectable" bind-source="popover" bind-property="visible" bind-flags="invert-boolean">True</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
</template>
|
|
</interface>
|