Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If accessibility is disabled dialogs cannot be opened #616

Closed
chris-steele opened this issue Jan 16, 2025 · 7 comments · Fixed by #617
Closed

If accessibility is disabled dialogs cannot be opened #616

chris-steele opened this issue Jan 16, 2025 · 7 comments · Fixed by #617

Comments

@chris-steele
Copy link
Contributor

chris-steele commented Jan 16, 2025

Observations:

  • unopened dialogs are styled display:none by default
  • showModal is not called if accessibility has been disabled
  • problem began with core v6.60.3
@chris-steele
Copy link
Contributor Author

@oliverfoster don't suppose you could have a look at this, could you?

@oliverfoster
Copy link
Member

I don't understand what you mean by 'if accessibility is disabled". Could you clarify plz?

@chris-steele
Copy link
Contributor Author

Hi @oliverfoster, sorry for not being clearer, by disabling accessibility I meant setting the following:

"_accessibility": {
    "_isEnabled": false

ref: https://github.com/adaptlearning/adapt_framework/blob/master/src/course/config.json#L14

@oliverfoster
Copy link
Member

I thought we'd removed that option. Why would you set this to false?

@chris-steele
Copy link
Contributor Author

I thought we'd removed that option. Why would you set this to false?

it's a jolly good question, I don't think it would give you much advantage in any arena?

Thank you so much for that PR 👍

@oliverfoster
Copy link
Member

oliverfoster commented Jan 16, 2025

Why are you setting it to _isEnabled: false? How did you find this bug? I need to know to tell you if the fix will work.

2025-01-20 Update: It was caused by an accidental AAT configuration

@oliverfoster
Copy link
Member

As a warning to others:

Notify and Drawer now use HTMLDialogElement.showModal instead of the [aria-hidden=true], [tabindex=-1] method we've been using for years.

Popups also now use CSS animations and positioning, rather than velocity animations and JavaScript calculations (except popup height, height is still derived and set in the JS).

The popups changed over to showModal and CSS in this pr and a bug was found when config.json:_accessibility._isEnabled was set to false resulting in this pr.

Note that the _accessibility._isEnabled property should never be set to false except in extreme circumstances (undefined) and its inclusion as an option in the AAT is suspect, should be eyeballed with extreme caution and the option should preferably be ignored as if its mere existence is an abomination to sanity.

It is worth noting that when upgrading a course or AAT to framework version >=5.42.1 (using core >=6.60.3 ) that the above bug will appear only when setting _accessibility._isEnabled to false.

It is also worth noting that, if you have an existing theme, you will need to copy the default CSS popup animations and shadow animations from the corresponding vanilla pr. Without these defaults the Notify and Drawer popups will not animate.

@github-project-automation github-project-automation bot moved this from New to Recently Released in adapt_framework: The TODO Board Jan 27, 2025
github-actions bot pushed a commit that referenced this issue Jan 27, 2025
## [6.60.4](v6.60.3...v6.60.4) (2025-01-27)

### Fix

* Popup support in a11y disabled (fixes #616) (#617) ([9404558](9404558)), closes [#616](#616) [#617](#617)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Recently Released
Development

Successfully merging a pull request may close this issue.

2 participants