Bug 163801 - Paragraphs unexpectedly implement the "selection" interface, states, and events
Summary: Paragraphs unexpectedly implement the "selection" interface, states, and events
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 77679
Blocks: a11y-Linux
  Show dependency treegraph
 
Reported: 2024-11-07 14:43 UTC by Joanmarie Diggs
Modified: 2024-11-30 03:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2024-11-07 14:43:26 UTC
Paragraphs in Writer, unlike text objects in other applications, toolkits, and browsers implement AtkSelection.

According to these docs: https://docs.gtk.org/atk/iface.Selection.html

> The ATK interface implemented by container objects whose
> AtkObject children can be selected.

> AtkSelection should be implemented by UI components with
> children which are exposed by #atk_object_ref_child and
> atk_object_get_n_children, if the use of the parent UI
> component ordinarily involves selection of one or more>
> of the objects corresponding to those AtkObject children -
> for example, selectable lists.

> Note that other types of “selection” (for instance text selection)
> are accomplished a other ATK interfaces - AtkSelection is limited
> to the selection/deselection of children.

Michael: Please take a look. Thanks in advance!
Comment 1 Michael Weghorn 2024-11-29 10:58:03 UTC
(In reply to Joanmarie Diggs from comment #0)
> Paragraphs in Writer, unlike text objects in other applications, toolkits,
> and browsers implement AtkSelection.
> 
> According to these docs: https://docs.gtk.org/atk/iface.Selection.html
> 
> > The ATK interface implemented by container objects whose
> > AtkObject children can be selected.
> 
> > AtkSelection should be implemented by UI components with
> > children which are exposed by #atk_object_ref_child and
> > atk_object_get_n_children, if the use of the parent UI
> > component ordinarily involves selection of one or more>
> > of the objects corresponding to those AtkObject children -
> > for example, selectable lists.
> 
> > Note that other types of “selection” (for instance text selection)
> > are accomplished a other ATK interfaces - AtkSelection is limited
> > to the selection/deselection of children.

As far as I can see, paragraphs currently support *both* kinds of selection:

1) Text selection is reported via the AT-SPI/ATK Text interface.
2) Paragraphs can also have children, e.g. an image (anchored as character and located inside of the paragraph), and that child can be selected (or not), and reports the "selected" state accordingly.

@joanie: What's the recommended way to expose that on the a11y layer if not via the Selection interface?
Comment 2 Joanmarie Diggs 2024-11-29 14:54:08 UTC
I'm afraid my answer is that the hypertext and hyperlink interfaces should be implemented. Somewhere I swear there's a bug boiling down to "Orca doesn't announce an image when you arrow to it, or navigate by line." But I cannot find it at the moment.

Anyhow....

A given child object (e.g. an image) would be represented by an embedded object character in the parent (e.g. the paragraph). When that image is selected, it's corresponding embedded object character would be selected. Then Orca would need to do some additional work (the work it already does for web content, but not yet for LO content) to present the right information.

Note that the additional work Orca does for web content depends upon the use of both AtspiHypertext and AtspiHyperlink.
Comment 3 Michael Weghorn 2024-11-29 15:50:45 UTC
(In reply to Joanmarie Diggs from comment #2)
> I'm afraid my answer is that the hypertext and hyperlink interfaces should
> be implemented. Somewhere I swear there's a bug boiling down to "Orca
> doesn't announce an image when you arrow to it, or navigate by line." But I
> cannot find it at the moment.

That should be tdf#77679.

> A given child object (e.g. an image) would be represented by an embedded
> object character in the parent (e.g. the paragraph). When that image is
> selected, it's corresponding embedded object character would be selected.
> Then Orca would need to do some additional work (the work it already does
> for web content, but not yet for LO content) to present the right
> information.
> 
> Note that the additional work Orca does for web content depends upon the use
> of both AtspiHypertext and AtspiHyperlink.

Thanks, that makes sense.