Explain why project feature visibility selects are disabled
What does this MR do and why?
In Project Settings > General > Visibility, the per-feature access-level selects are disabled with no explanation when the project is private (there is no less-visible level to pick) or, for repository-dependent features, when the repository is disabled. Users hit a greyed-out control and have no way to learn why (issue, diagnosis confirmed by the PM in the thread).
This adds a tooltip to the select's wrapper naming the cause:
- Project is private: "Feature visibility cannot be changed while the project is private."
- Repository disabled: "This feature requires the repository to be enabled."
A feature that is simply toggled off gets no tooltip; the adjacent toggle already conveys that. Following the Pajamas tooltip accessibility guidance, the wrapper becomes focusable (tabindex="0" plus a focus ring) only while a reason is shown, so keyboard users can see it; disabled form controls cannot receive focus themselves. Same pattern as the role listbox in app/assets/javascripts/organizations/users/components/user_details_drawer.vue.
ProjectFeatureSetting has a single consumer (settings_panel.vue). The Pages row intentionally stays without a reason: a private project can still offer public Pages, so its select is not locked by privacy.
References
- Related to #503680 (closed)
Screenshots or screen recordings
| State | Before | After |
|---|---|---|
| Private project (hover a locked select) | ![]() |
![]() |
| Repository turned off (hover a dependent select) | ![]() |
![]() |
How to set up and validate locally
- Create or use a private project, visit Settings > General > Visibility, project features, permissions.
- Hover or keyboard-focus any disabled feature-visibility select (for example Issues): the tooltip explains the project is private.
- Set Repository access to "No one": hover the Merge requests or CI/CD select: the tooltip explains the repository is required.
- Make the project public: selects enable, no tooltip, wrapper not focusable.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.



