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

not accessible when the accessibility app is deactivated #244

Open
diemelone opened this issue Apr 20, 2021 · 9 comments
Open

not accessible when the accessibility app is deactivated #244

diemelone opened this issue Apr 20, 2021 · 9 comments
Labels

Comments

@diemelone
Copy link

Describe the bug
not accessible when the accessibility app is deactivated

To Reproduce

  1. deactivate the accessibility app
  2. Try to activate Breeze Dark in the settings

Expected behavior
Setting should be accessible

Screenshots
not needed

Setup (please complete the following information):

  • Nextcloud version: 21
  • Theme version:21

Additional context
Breeze Dark should add the accessibility settingspage as well if it does not exist already.
I deactivated the accessibility app because the native darkmode looks weird with my chosen primary color. I deactivated it for users not to have the same issues.

@diemelone diemelone added the bug label Apr 20, 2021
@mwalbeck
Copy link
Owner

I definitely agree but the reason I haven't done it is because currently it generates error messages if two apps register the same settings section. I remember seeing a discussion about it a while back but now I can't seem to find it. I also don't know if it is possible to do a conditional registration, so the section only gets registered by breeze dark if it doesn't exist. I haven't had too much time to look into it but so far I haven't found a way to do it yet.

@diemelone
Copy link
Author

Ok, for the meantime I have a quick and dirty fix, without changing code (to avoid having to do this on every update) I just hid the accessibility theme from the users using the custom css app. If they don't know its there, they wont search.
I guess changing the theme for every user should be possible via the preferences in the database

#accessibility .preview-list {
    display: none;
}

@mwalbeck
Copy link
Owner

Yeah, you can also do the following if you just want to hide the dark theme

#accessibility .preview-list .preview:nth-of-type(2) {
	display: none;
}

I guess changing the theme for every user should be possible via the preferences in the database

You can do it with the occ command. The Accessibility has a theme option that is either not present or set to dark so it just needs to be delete. The following shows which options are set for the Accessibility app

php occ user:setting UID accessibility

And to delete the theme option you can do this

php occ user:setting --delete UID accessibility theme

Of course replacing UID with the UID of a user

@diemelone
Copy link
Author

I also don't know if it is possible to do a conditional registration, so the section only gets registered by breeze dark if it doesn't exist.

Did you take a look at apps like quota warning, impersonate, mail, ... they all appear in the same admin setting section but if none is activated you cant see the section.
Otherwise this could be a workaround: a dropdownlist of available setting sections for the admin to choose in which section breeze dark settings are located.

@mwalbeck
Copy link
Owner

Did you take a look at apps like quota warning, impersonate, mail, ... they all appear in the same admin setting section but if none is activated you cant see the section.

There are some settings sections that are built-in to Nextcloud core which behave like that which these apps are using, but currently it doesn't seem like that functionality can be achieved when apps register their own sections.

Otherwise this could be a workaround: a dropdownlist of available setting sections for the admin to choose in which section breeze dark settings are located.

Sadly I don't think that is feasible based on how the system currently works.

@diemelone
Copy link
Author

Is there any way of manually creating the settings section to get it to work?

@mwalbeck
Copy link
Owner

As far as I know settings sections has to be registered with code either in Nextcloud core or in an app, so no I don't believe so.

@diemelone
Copy link
Author

The accessibility site is still there, it is just hidden so I used the "external sites" app to create a new list item in this menu which leads to the accessibility setting:
https://NC.tld/index.php/settings/user/accessibility

grafik

grafik

@mwalbeck
Copy link
Owner

mwalbeck commented May 6, 2021

Sorry for the slow responses, I've been quite busy lately.

That's interesting and it seems like a reasonable workaround. Though it also provides a way to create a workaround in the app. One possibility would be adding the "Accessibility" settings section to the settings sidebar with javascript if it doesn't exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants