I am programmatically posting a suggestion comment to a Bitbucket Server PR using the POST /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/comments endpoint.
Payload:
{
"text":"The progress bar component does not expose its name, role, state, and value programmatically to assistive technologies. The visual progress indicator lacks proper ARIA attributes such as role=\"progressbar\", aria-valuemin, aria-valuemax, aria-valuenow, and aria-label, making it impossible for screen readers and other assistive technologies to correctly interpret and announce the progress information to users.\n\n```suggestion\n <div\n className=\"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2 mt-2\"\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round((userData?.completedLessons / userData?.totalLessons) * 100) || 0}\n aria-label={`Learning progress: ${userData?.completedLessons} out of ${userData?.totalLessons} lessons completed`}\n >\n <div\n className=\"bg-blue-600 h-2 rounded-full transition-all duration-300\"\n style={{\n width: `${\n (userData?.completedLessons / userData?.totalLessons) * 100\n }%`,\n }}\n />\n </div>\n```",