If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

textarea claims bogus trailing \n (HTML br)

RESOLVED FIXED in mozilla24

Status

()

Core
Disability Access APIs
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: surkov, Assigned: surkov)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

unspecified
mozilla24
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Textarea container trailing <br> element when it has not empty value lie
<textarea>h</textarea>

See bug 503838.

We just create an accessible for that br which is mapped to '\n'.

That br node is not nsGkAtoms::mozeditorbogusnode, it is  nsGkAtoms::mozdirty="" node.
(Assignee)

Updated

5 years ago
Blocks: 613857
(Assignee)

Comment 1

5 years ago
note, there's related bug 240933 (which seems removed all brs but the trailing one).
(Assignee)

Updated

5 years ago
Depends on: 240933

Comment 2

5 years ago
Not sure what you're asking for here, Alexander.
(Assignee)

Comment 3

5 years ago
if I have <textarea>hello</textarea> then DOM looks the following way (judging by accessibility tree):

textarea
  textleaf (hello)
  br

that br is confusing for accessibility. Why it wasn't removed in bug 240933 and is there a reason to have it nowdays?

Comment 4

5 years ago
(In reply to comment #3)
> if I have <textarea>hello</textarea> then DOM looks the following way (judging
> by accessibility tree):
> 
> textarea
>   textleaf (hello)
>   br
> 
> that br is confusing for accessibility. Why it wasn't removed in bug 240933 and
> is there a reason to have it nowdays?

Because it's needed for caret positioning.  Of course we can fix that, but we don't have anybody to do that work!  Until that happens, accessibility should ignore that node.
(Assignee)

Comment 5

5 years ago
so at accessibility layer we can just ignore any non text nodes under textarea. Is that correct?

Comment 6

5 years ago
(In reply to comment #5)
> so at accessibility layer we can just ignore any non text nodes under textarea.
> Is that correct?

This should be the only non-textnode node under textarea's anonymous div, so, yes.  Although if you want to be super conservative, you could choose to only ignore trailing BRs.
(Assignee)

Comment 7

5 years ago
Should I leave this bug open for layout part and get another one for accessibility fix?

Comment 8

5 years ago
(In reply to comment #7)
> Should I leave this bug open for layout part and get another one for
> accessibility fix?

No, we have bug 503838 on the higher level problem.
(Assignee)

Comment 9

5 years ago
Created attachment 752682 [details] [diff] [review]
patch
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #752682 - Flags: review?(trev.saunders)
do you understand regressions and have plan to work on them?
(Assignee)

Comment 11

5 years ago
(In reply to Trevor Saunders (:tbsaunde) from comment #10)
> do you understand regressions

I don't but as long as new move by words logic still works with the change then I don't worry about move by lines regressions

> and have plan to work on them?

yes
(In reply to alexander :surkov from comment #11)
> (In reply to Trevor Saunders (:tbsaunde) from comment #10)
> > do you understand regressions
> 
> I don't but as long as new move by words logic still works with the change
> then I don't worry about move by lines regressions


ok
Attachment #752682 - Flags: review?(trev.saunders) → review+
(Assignee)

Comment 13

5 years ago
Btw, I was reported that JAWS misses textareas in vb in Aurora (Firefox 23) because it started to expose child text leaf accessibles and that was caused by bug 865997. Bug 865997 logic is expose everything as long as non textual children are presented. In this bug we prevent HTML br to appear inside textareas so this bug will be a fix for JAWS issue. We need to backport it Aurora.
(Assignee)

Comment 14

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/7ec8a1e24dd6
Flags: in-testsuite+
https://hg.mozilla.org/mozilla-central/rev/7ec8a1e24dd6
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24

Updated

5 years ago
Depends on: 875794
Note that this caused bug 875794. I will not approve a backport to 23 unless that bug is resolved and a fix tested. The alternative is to back out this bug and have FS find another solution to detecting textareas properly.
You need to log in before you can comment on or make changes to this bug.