gui design – Why does Airbnb put the close button for a dialog on the top left corner?

Stack Exchange Network


Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

gui design – Why airbnb put close button of a dialog on top left?

Stack Exchange Network


Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

accessibility – When is it ‘wrong’ to put tabindex=0 on non-interactive content?

Adapt did the wrong thing for the right reason. The blog you referred to had some great information. Change the question from “Is accessibility required?” to “Is accessibility desirable?”. Based on their blog, they have a good concept of what accessibility is but their concept of how to implement accessibility isn’t accurate. They seem to think that those that need accessible accommodations should be segregated by turning on an “accessible mode”. As we know from just about any country’s history, segregation is not a solution.

Their accessibility page says:

All Adapt courses have the accessibility feature built-in. However, it
must be enabled during development by the course author before the
course is published.

So, does the course author have to make the decision whether to turn that feature on or not? Is it up to the course author to decide if accessibility is desirable (the word they used in their blog)? Why is there an option to turn it on? Why is it not always on? Or rather, why is there an option at all? The default should be to build an accessible interface.

That same option/segregation is offered to the end user too.

To activate the accessibility feature while viewing a course, press
the Tab key. A button is displayed: “Turn accessibility on?”

Once the feature is activated, pressing the Tab key navigates the
learner through content. Focused content regions are highlighted with
an outline. And ARIA labels are enabled for assistive technology such
as screen readers.

What’s different about the interface that requires accessibility to be turned on? Any interactive object you can navigate to with the keyboard should always have a valid label or name (which is what ARIA labels give you if you can’t provide a label/name with a native HTML element). Always. Why would you ever not want a valid name for an object? You shouldn’t have to turn that option on.

A user that requires a screen reader to interact with the page does not want to be treated any differently than a full sighted user. They want to navigate to interactive objects using the TAB key just like any other keyboard user and they do not expect to tab to heading or paragraphs or lists or whatever.

Screen reading software has fantastic tools built in that allow for navigation to non-interactive elements. You can press the ‘H’ key to go to the next heading (and hear it read), or for more granularity, press the ‘2’ key to go to the next <h2>. You can press the ‘L’ key to go to the next list, or the ‘I’ (eye) key to go to the next element in a list. Press ‘R’ or ‘D’ (depending on the screen reader) to go to the next “landmark”. None of these elements are natively keyboard accessible and are not expected to be. They should not have tabindex="0".

Now, none of these shortcuts will work if the content author does not use native HTML tags that have built in semantic meaning. That is, use

<h2>Really important info</h2> 

instead of

<div class="big-bold-font">Really important info</div>

Screen reading software does not know that the “big-bold-font” class means the element should be a heading but it definitely knows what an <h2> is. In the latter case, if you have to use a <div>, that’s where ARIA attributes come in:

<div class="big-bold-font" role="heading" aria-level="2">Really important info</div>

With the correct semantic meaning, whether provided by native HTML tags such as <h2> or augmented by using ARIA attributes such as role and aria-level, a screen reader user can easily navigate to these elements without them having tabindex="0"'.

That’s why I think Adapt understands what accessibility is but does not understand how accessibility is used.

So that’s a really, really long answer (sorry) to what could have been a simple answer. Your OP title is

“When is it ‘wrong’ to put tabindex=0 on non-interactive content?”

Answer: Always.

Should we put magento in maintenance mode before installation: upgrade and configuration: di: compilation?

Does he run setup:upgrade or setup:di:compile cause problems if i run it in production? I am concerned that my customers may see bugs after calling these commands.

symfony4 – reactivation of the Symfony rest API for the fat PUT endpoint

Logic I have a solution request to request a new solution. I have for this a type of PUT endpoint for an update solution with variable parameters corresponding to the method
I want to refactor this method please.

/**
 * @Route("/{id}", name="solution_requests_update", methods={"PUT"}, defaults={"permission_needed": ROLE::PERMISSION_REQUEST_WRITE})
 * @param Request $request
 * @return JsonResponse
 */
public function update(
    string $id,
    Request $request,
    Security $security,
    StatesHandler $statesHandler
) : JsonResponse {

    $solutionRequest =  $this->em->getRepository(SolutionRequest::class)->find($id);
    $user = $security->getUser();
    if (!$solutionRequest) {
        throw new NotFoundHttpException(sprintf('this solution request not found for %s!', $id));
    }

    $scope = $this->productService->checkScope(
        $security->getUser(),
        $request->attributes->get('permission_needed')
    ) ?? '';
    // check permission
    $canEditSolutionRequest = $this->securitySolutionRequest->canEditSolutionRequest(
        $user,
        $scope,
        $solutionRequest
    );

    $data = json_decode($request->getContent(), true);

    if (!empty($data('evaluations'))) {
        $this->em->getRepository(SolutionRequestValidation::class)->update($data('evaluations'), $user);
        $solutionRequest->setListSolutionRequestValidation($solutionRequest->getListSolutionRequestValidation());
    }

    if (!empty($data('entities')) && $canEditSolutionRequest) {
        $solutionRequest = $this->em->getRepository(SolutionRequest::class)->updateEntityValues(($data('entities')), $solutionRequest);
    }

    if (!empty($data('solutions')) && $solutionRequest->getState() < SolutionRequest::EVALUATION && $canEditSolutionRequest) {
        $solutionsChecked = $this->solutionChecker->filterSolutionsExist($data('solutions'));
        $solutionRequest->setSolutionsId($solutionsChecked);
    }

    // extra parameter function
    $parametersFunction = (
        'setAppreciations' => (
            'user' => $user,
            'scope' => $scope
        )
    );
    if($canEditSolutionRequest)
        $solutionRequest = $this->mappingParameters($solutionRequest, $this->attributesMapping, $data, $parametersFunction);

    if( !$canEditSolutionRequest && $solutionRequest->getDomainManager()->getId() === $user->getId())
    {
        $solutionRequest = $this->mappingParameters($solutionRequest, ('appreciations' => 'setAppreciations'), $data, $parametersFunction);
    }

    $solutionRequest = $statesHandler->process($solutionRequest);
    $this->em->persist($solutionRequest);
    $this->em->flush();

    $solutionRequest =  $this->em->getRepository(SolutionRequest::class)->find($id);

    return JsonResponse::fromJsonString(
        $this->serializer->serialize(
            $solutionRequest,
            ('solution_request')
        ),
        Response::HTTP_OK
    );
}

Automatic mapping method in controller

 /**
 * Automatic mapping
 *
 * @param SolutionRequest $solutionRequest
 * @param array $attributesMapping
 * @param array $data
 * @return SolutionRequest
 */
private function mappingParameters(
    SolutionRequest $solutionRequest,
    array $attributesMapping,
    ?array $data, 
    array $parametersFunction = ()
) : SolutionRequest
{
    if (empty($data)) {
        return $solutionRequest;
    }

    foreach ($data as $key => $value) {
        if (array_key_exists($key, $attributesMapping)) {
            $nameFunction = $attributesMapping($key);
            // inject extra prameters for this function
            if (array_key_exists($nameFunction, $parametersFunction)) {
                $solutionRequest->$nameFunction($value, $parametersFunction($nameFunction));
                continue;
            }
            $solutionRequest->$nameFunction($value);
        }
    }

    return $solutionRequest;
}

My settings and update method

Method for automatic mapping in controller

 /**
 * Automatic mapping
 *
 * @param SolutionRequest $solutionRequest
 * @param array $attributesMapping
 * @param array $data
 * @return SolutionRequest
 */
private function mappingParameters(
    SolutionRequest $solutionRequest,
    array $attributesMapping,
    ?array $data, 
    array $parametersFunction = ()
) : SolutionRequest
{
    if (empty($data)) {
        return $solutionRequest;
    }

    foreach ($data as $key => $value) {
        if (array_key_exists($key, $attributesMapping)) {
            $nameFunction = $attributesMapping($key);
            // inject extra prameters for this function
            if (array_key_exists($nameFunction, $parametersFunction)) {
                $solutionRequest->$nameFunction($value, $parametersFunction($nameFunction));
                continue;
            }
            $solutionRequest->$nameFunction($value);
        }
    }

    return $solutionRequest;
}

My settings and update method

   private $attributesMapping = (
    'appreciations' => 'setAppreciations',
    'softwareSearchInfo' => 'setSoftwareSearchInfo',
    'softwareNeedsInfo' => 'setSoftwareNeedsInfo',
    'intendedUsers' => 'setIntendedUsers',
    'intendedROI' => 'setIntendedROI',
    'impactLever' => 'setImpactLever',
    'costEstimation' => 'setCostEstimation',
    'costDriver' => 'setCostDriver',
    'furtherInfo' => 'setFurtherInfo'
);

How can I refactor it for better code? Thank you

you can't put a Pinterest link in a pin ??

Hi all,

I have created a table with product pins inside, and I would like to publish cover pins in group tables which refer to this table I created, not to content outside of Pinterest. However, the system does not allow me to put a Pinterest link in a pin:
"! To save an idea you find on Pinterest, use the Save button that you find on each pin."

Why could a pin only link to content outside of Pinterest, not a forum?

Thank you for your help
SEMrush

Put your website in my signature

1 month – 3 dollars
6 months – $ 6 (save $ 2)
1 year – $ 10 (save $ 4)

You pay to advertise your banner in my signature. If these offers are out of your budget, feel free to send me an offer.

options – How do I put BitOffer bonuses in my wallet?

I'm a new guy trying to jump into the bitcoin rabbit hole after seeing the news from Bitcoin Halving Counting Down.

My friend said that BitOffer didn't take a lot of risk and was fairly stable for the bitcoin option. I tried to create an account yesterday and I received 50 bonuses once at the end of registration. I tried the "highs and lows Bitcoin 1 min" Maybe because of the luck of the new guy, I tried it five times and I got quite a profit.

I am now trying to figure out how to take the bonus out of my wallet. Has anyone tried it before?