Repository: cli/cli
File: pkg/cmd/accessibility/accessibility.go (Go)

Code before:

	cmd := &cobra.Command{
		Use:     "accessibility",
		Aliases: []string{"a11y"},
		Short:   "Learn about GitHub CLI accessibility experiences",
		Long:    longDescription(opts.IO),
		Hidden:  true,
		RunE: func(cmd *cobra.Command, args []string) error {
			if opts.Web {
				if opts.IO.IsStdoutTTY() {
					fmt.Fprintf(opts.IO.ErrOut, "Opening %s in your browser.\n", text.DisplayURL(feedbackURL))
				}
				return opts.Browser.Browse(feedbackURL)
			}

			return cmd.Help()
		},
		Example: heredoc.Doc(`
			# Open the GitHub Accessibility site in your browser
			$ gh accessibility --web

			# Display color using customizable, 4-bit accessible colors
			$ gh config set accessible_colors enabled

			# Display issue and pull request labels using RGB hex color codes in terminals that support 24-bit true color
			$ gh config set color_labels enabled

			# Use input prompts without redrawing the screen
			$ gh config set accessible_prompter enabled

			# Disable motion-based spinners for progress indicators in favor of text
			$ gh config set spinner disabled
		`),
	}

	cmd.Flags().BoolVarP(&opts.Web, "web", "w", false, "Open the GitHub Accessibility site in your browser")
	cmdutil.DisableAuthCheck(cmd)

	return cmd
}

func longDescription(io *iostreams.IOStreams) string {
	cs := io.ColorScheme()
	title := cs.Bold("Learn about GitHub CLI accessibility experiences")
	color := cs.Bold("Customizable and contrasting colors")
	prompter := cs.Bold("Non-interactive user input prompting")
	spinner := cs.Bold("Text-based spinners")
	feedback := cs.Bold("Join the conversation")

	return heredoc.Docf(`
		%[2]s

Review comment (suggestion):
```suggestion
			$ gh config set accessible_colors enabled
```

Code after:

	cmd := &cobra.Command{
		Use:     "accessibility",
		Aliases: []string{"a11y"},
		Short:   "Learn about GitHub CLI's accessibility experiences",
		Long:    longDescription(opts.IO),
		Hidden:  true,
		RunE: func(cmd *cobra.Command, args []string) error {
			if opts.Web {
				if opts.IO.IsStdoutTTY() {
					fmt.Fprintf(opts.IO.ErrOut, "Opening %s in your browser.\n", text.DisplayURL(webURL))
				}
				return opts.Browser.Browse(webURL)
			}

			return cmd.Help()
		},
		Example: heredoc.Doc(`
			# Open the GitHub Accessibility site in your browser
			$ gh accessibility --web

			# Display color using customizable, 4-bit accessible colors
			$ gh config set accessible_colors enabled

			# Use input prompts without redrawing the screen
			$ gh config set accessible_prompter enabled

			# Disable motion-based spinners for progress indicators in favor of text
			$ gh config set spinner disabled
		`),
	}

	cmd.Flags().BoolVarP(&opts.Web, "web", "w", false, "Open the GitHub Accessibility site in your browser")
	cmdutil.DisableAuthCheck(cmd)

	return cmd
}

func longDescription(io *iostreams.IOStreams) string {
	cs := io.ColorScheme()
	title := cs.Bold("Learn about GitHub CLI's accessibility experiences")
	color := cs.Bold("Customizable and contrasting colors")
	prompter := cs.Bold("Non-interactive user input prompting")
	spinner := cs.Bold("Text-based spinners")
	feedback := cs.Bold("Join the conversation")

	return heredoc.Docf(`
		%[2]s

		As the home for all developers, we want every developer to feel welcome in our
		community and be empowered to contribute to the future of global software