Shorten attribute and method names in nsIAccessible

RESOLVED FIXED

Status

()

Core
Disability Access APIs
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: Aaron Leventhal, Assigned: Aaron Leventhal)

Tracking

({access})

Trunk
access
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

15 years ago
A lot of names in nsIAccessible have "acc" in them, e.g.:
GetAccFirstChild(), AccGetBounds(), GetAccActionName()

This bugs is to get rid of the "acc" - it's redundant since we're already using
nsIAccessible, e.g.:
GetFirstChild(), GetBounds(), GetActionName()
(Assignee)

Comment 1

15 years ago
Created attachment 128854 [details] [diff] [review]
Remove "acc" from attrib and method names in nsIAccessible

Comment 2

15 years ago
Comment on attachment 128854 [details] [diff] [review]
Remove "acc" from attrib and method names in nsIAccessible

looks great!

the "getFromXXX" method names are a bit odd to me - maybe you want
getLeftNode() or something? I think its "get from" that bothers me... anyhow,
sr=alecf on this because its good stuff, but if you want to change those
methods too, the sr= still applies.
Attachment #128854 - Flags: superreview+
(Assignee)

Comment 3

15 years ago
Okay, I'm going to put up a new patch though.

I found a problem when compiling under Linux:

nsIAccessible::GetParent, GetPreviousSibling, GetNextSibling, GetFirstChild,
GetLastChild all now conflict with the same method names in nsIAccessNode.

See,
nsAccessible inherits from nsAccessNode and implements both nsIAccessible and
nsIAccessNode.

Therefore, the method names need to be different -- they navigate relatived to
the accessible tree or the access node tree.

The architecture is documented here:
http://www.mozilla.org/projects/ui/accessibility/accessible-architecture.html
(Assignee)

Comment 4

15 years ago
Alec, wouldn't GetAccessibleFrom[Left/Right/Above/Below]() be better?

I'm concerned that if we use the term node people might forget that we're not
talking about DOM nodes.
Also, that way we we wouldn't end up with GetAboveNode(), which sounds strange
to me.

Comment 5

15 years ago
node/accessible/whatever, just as long as it isn't "acc" :)

My big issue with the word "accessible" is that its an adjective, not a noun..
but I guess that's maybe something for a different rewrite of these interfaces :)
(Assignee)

Comment 6

15 years ago
Alec, The term "accessible" has historically been used as a noun in
accessibility interfaces.
(Assignee)

Comment 7

15 years ago
Created attachment 128881 [details] [diff] [review]
Fixes alecf and gcc's issues
(Assignee)

Updated

15 years ago
Attachment #128854 - Attachment is obsolete: true
(Assignee)

Comment 8

15 years ago
Created attachment 128883 [details] [diff] [review]
Hmm, last patch was corrupted
Attachment #128881 - Attachment is obsolete: true
(Assignee)

Comment 9

15 years ago
Created attachment 128887 [details] [diff] [review]
Fixes last GCC warnings
Attachment #128883 - Attachment is obsolete: true
(Assignee)

Updated

15 years ago
Attachment #128887 - Flags: superreview?(alecf)
Attachment #128887 - Flags: review?(kyle.yuan)
(Assignee)

Updated

15 years ago
Attachment #128887 - Flags: superreview+
(Assignee)

Comment 10

15 years ago
Comment on attachment 128887 [details] [diff] [review]
Fixes last GCC warnings

Carried sr=alecf
Attachment #128887 - Flags: superreview?(alecf)

Comment 11

15 years ago
Comment on attachment 128887 [details] [diff] [review]
Fixes last GCC warnings

I like the new name - less is more.
r=kyle
Attachment #128887 - Flags: review?(kyle.yuan) → review+
(Assignee)

Comment 12

15 years ago
thanks everyone. checked in.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.