The Queen of Hearts relates to the young boy in "Araby" in basically one manor: idealistic perspective versus reality. The reality is no one really cares about the Queen of Hearts and her ranting and raving. In fact, no one really takes her seriously because when has anyone witnessed her cutting off anyones head? Never. In her ideal world, everyone bows down to her (the bowing of the cards) and everyone attends to her needs (the Knave is on trial for stealing her tarts, even though the tarts are present in court). In the end, no one takes her seriously nor does anyone, especially Alice, fall for her my way or the highway mentality.
The same idealistic perspective is evident for the young boy in "Araby." Reality is that Mangan's sister does not really care if the boy gets her a gift from the bazaar. In fact, no one really is impressed with attending the bazaar except for himself - he has placed himself in this idealistic world due to his adoration for Mary (Jesus' mother) and Mangan's sister, even though there is no returned adoration or respect.
Despite the intensity of each character's wants (Queen respect, Boy recognition), neither of them achieve their goals.