After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 455276 - AccessibleName for HTML text labels is the raw HTML
AccessibleName for HTML text labels is the raw HTML
Status: RESOLVED NOTABUG
Product: at-spi
Classification: Platform
Component: javabridge
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jeff Cai
Jeff Cai
Depends on:
Blocks: 455259
 
 
Reported: 2007-07-09 20:16 UTC by Lynn Monsanto
Modified: 2007-11-14 08:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Lynn Monsanto 2007-07-09 20:16:09 UTC
See the Orca Bug 455259. The AccessibleName is the raw HTML for Java label containing HTML. 

For example, the SwingSet2 TabbedPane demo has a page tab with the label "Bouncing Babies!" in blue. The AccessibleName is "<html><font color=blue><bold><center>Bouncing Babies!</center></bold></font></html>".
Comment 1 Willie Walker 2007-11-01 18:24:49 UTC
Hi Jeff: any ideas on this one?
Comment 2 Jeff Cai 2007-11-08 07:55:59 UTC
I don't think this belongs to a bug of jab. Jab just forwards the message to AT and it hardly changes anything. So the message should be explained by AT or stripped the html marks by java applications.
Comment 3 Willie Walker 2007-11-08 13:55:20 UTC
(In reply to comment #2)
> I don't think this belongs to a bug of jab. Jab just forwards the message to AT
> and it hardly changes anything. So the message should be explained by AT or
> stripped the html marks by java applications.

I don't believe the accessible name of an object should contain HTML markup.  Instead, I believe the intent of the name is that it is a human consumable string.  As such, rather than requiring all assistive technologies to strip out the HTML markup from the name, it might be better for the JABG to do the stripping.
Comment 4 Jeff Cai 2007-11-08 14:16:07 UTC
Because JABG doesn't know the syntax and semantic of the name returned from the accessible object, it of course has no way to explain it. Futhermore, if there's processing string in JABG, this will have a negative effect on preformance. 

I think the best way is to let java applications return the real name without html markups in their implementation of getAccessibleName for components.
Comment 5 Willie Walker 2007-11-09 14:18:26 UTC
(In reply to comment #4)
> Because JABG doesn't know the syntax and semantic of the name returned from the
> accessible object, it of course has no way to explain it. Futhermore, if
> there's processing string in JABG, this will have a negative effect on
> preformance. 
> 
> I think the best way is to let java applications return the real name without
> html markups in their implementation of getAccessibleName for components.
> 

To make sure I understand: your recommendation is that application developers that use HTML markup should explicitly set the accessible name?  If so, this seems like something we may continually struggle with.  I wonder if we might want to put an RFE directly into Java Swing to do some parsing of the string first and do the automatic setting of the name if it contains markup.
Comment 6 Jeff Cai 2007-11-14 08:42:50 UTC
Yes. The application developers should call setAccessibleName to provide the name for AT. This is also the way that all GNOME C applications do. Hence, I'll close it as "not a defect".