aria-pressed change on button accessible doesn't make accessible recreation

NEW
Unassigned

Status

()

7 years ago
7 years ago

People

(Reporter: surkov, Unassigned)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
follow up from bug 716644 comment #59:

> > > what about the case of an element that doesn't have aria-pressed then
> > > aria-pressed is set on it?  I don't believe we recreate in that case, but
> > > ARIATransformRole() will return a different role.
> > 
> > well, we have a bug then, the role is constant during accessible life cycle.
> 
> what else depends on that being true?  I'd be inclined to allow changes in
> role like that during life cycle. in any case we should figure out making
> this correct in a different bug.

When aria-pressed is changed on button accessible then the role can be changed too. Usually we always recreate an accessible when role was changed because the set of exposed interfaces can be changed. In this case it doesn't affect on exposed interfaces but no one API provides an event for role change so that can be surprise for AT (IA2 and ATK are affected since have own role for that) and from implementation perspective platform layers cache native role (OS X and ATK).
(In reply to alexander :surkov from comment #0)
> follow up from bug 716644 comment #59:
> 
> > > > what about the case of an element that doesn't have aria-pressed then
> > > > aria-pressed is set on it?  I don't believe we recreate in that case, but
> > > > ARIATransformRole() will return a different role.
> > > 
> > > well, we have a bug then, the role is constant during accessible life cycle.
> > 
> > what else depends on that being true?  I'd be inclined to allow changes in
> > role like that during life cycle. in any case we should figure out making
> > this correct in a different bug.
> 
> When aria-pressed is changed on button accessible then the role can be
> changed too. Usually we always recreate an accessible when role was changed
> because the set of exposed interfaces can be changed. In this case it
> doesn't affect on exposed interfaces but no one API provides an event for
> role change so that can be surprise for AT (IA2 and ATK are affected since

actually, atk at least has an event for this.

> have own role for that) and from implementation perspective platform layers
> cache native role (OS X and ATK).

I'm not sure caching the role like this is a good idea in the first place, so not sure if this is important or not.
(Reporter)

Comment 2

7 years ago
(In reply to Trevor Saunders (:tbsaunde) from comment #1)

> actually, atk at least has an event for this.

oh, I didn't know that. what event btw?

> > have own role for that) and from implementation perspective platform layers
> > cache native role (OS X and ATK).
> 
> I'm not sure caching the role like this is a good idea in the first place,
> so not sure if this is important or not.

I agree, we shouldn't have a huge win when caching (especially on mac where we spend extra 4 bytes per accessible).
(In reply to alexander :surkov from comment #2)
> (In reply to Trevor Saunders (:tbsaunde) from comment #1)
> 
> > actually, atk at least has an event for this.
> 
> oh, I didn't know that. what event btw?

object:property-changed:accessible-role I'd guess, although the atk code for this isn't the simplest thing in the world so I'm not positive.

> > > have own role for that) and from implementation perspective platform layers
> > > cache native role (OS X and ATK).
> > 
> > I'm not sure caching the role like this is a good idea in the first place,
> > so not sure if this is important or not.
> 
> I agree, we shouldn't have a huge win when caching (especially on mac where
> we spend extra 4 bytes per accessible).

but I guess we still need to recreate the accessible for windows right? :(
(Reporter)

Comment 4

7 years ago
(In reply to Trevor Saunders (:tbsaunde) from comment #3)

> but I guess we still need to recreate the accessible for windows right? :(

I think yes, at least we stay consistent. I hope nobody changes aria-pressed from undefined to defined so the role is not changed when the button is focused, button accessible is not recreated and thus AT don't get potentially confused.
You need to log in before you can comment on or make changes to this bug.