Opened 14 years ago
Closed 14 years ago
#7966 closed Bug (fixed)
Error suggestion not correct when we enter invalid values for width & height fields in Table dialog
Reported by: | Satya Minnekanti | Owned by: | Wiktor Walc |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.6.1 |
Component: | General | Version: | 3.6.1 |
Keywords: | IBM Discussion | Cc: | Damian, James Cunningham, Teresa Monahan, Anna Tomanek |
Description
To reproduce the defect:
In the Table Properties enter invalid values(-20 or 35ex) for width and press OK button.
Expected Result: An error dialog comes up with a waring message width must be a positive number greater than zero and valid CSS units are px em % .
Actual Result: An error dialog comes up with a waring message Specified value must be a valid CSS length unit
same issue when we enter invalid value for Height
This is not satisfying the criteria for A11y Checkpoint 3.3
Attachments (3)
Change History (15)
comment:1 Changed 14 years ago by
comment:3 Changed 14 years ago by
Milestone: | → CKEditor 3.6.1 |
---|
Changed 14 years ago by
Attachment: | 7966.patch added |
---|
comment:4 Changed 14 years ago by
Keywords: | Discussion added |
---|---|
Owner: | set to Garry Yao |
Status: | confirmed → review |
For me the error message is too long, it would be better if we could keep a shorter link which refers to the CSS spec for references, but looks like we're limited by browser alert ;(
comment:5 Changed 14 years ago by
Cc: | Anna Tomanek added |
---|---|
Status: | review → review_failed |
You've got confused thinking that htmlLength refers to height while cssLength refers to width ;)
I'm calling in Anna for help.
comment:6 Changed 14 years ago by
I would suggest something like this:
invalidCssLength : 'Specified value must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength : 'Specified value must be a positive number with or without a valid HTML measurement unit (px or %).',
However, if we were to introduce the additional requirement of adding the field name to the message (it makes sense given that the error message is displayed after the user fills in all the dialog window fields and does not really know which one was filled in incorrectly), I'd suggest something like:
'Value specified for the %Field_name% field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).',
'Value specified for the %Field_name% field must be a positive number with or without a valid HTML measurement unit (px or %)',
where %Field_name% would be the language string for the field label.
comment:7 Changed 14 years ago by
Owner: | Garry Yao deleted |
---|---|
Status: | review_failed → new |
So please just take over this ticket.
Changed 14 years ago by
Attachment: | 7966_2.patch added |
---|
comment:8 Changed 14 years ago by
Owner: | set to Wiktor Walc |
---|---|
Status: | new → review |
I have shortened the placeholder just to save few bytes.
comment:9 Changed 14 years ago by
I have updated the patch, because validation in the iframe dialog should actually use validate.htmlLength than validate.cssLength.
Changed 14 years ago by
Attachment: | 7966_3.patch added |
---|
comment:10 Changed 14 years ago by
The problem about stating "a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc)" is that now the user will have a great confusion about what are those "em, ex, pt, pc", or understanding how physical units (in, cm, mm) are used in a web page.
Is it really necessary to state all the units or could it be simplified to "a valid CSS measurement unit (eg: px, %, ...)"?
How many of you can really explain what is the usage of those units without looking up their definitions?
Personally: I use % only for widths and font sizes, em for margins and paddings, everything else is in pixels.
comment:11 Changed 14 years ago by
Status: | review → review_passed |
---|
Anyway the patch itself is a R+, if anyone sees a problem with committing it feel free to R- the ticket.
comment:12 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Just to clarify the issues here:
So a possible suggestion on changing this error message could be: "Width value must be a positive number and can be followed by a valid CSS measurement unit. Valid CSS units are; px, %, in, cm, mm, em, ex, pt and pc", e.g. "100%".